An agent is an entity that perceives its environment through sensors and acts upon it using actuators. An environment is the external context in which an agent operates. The document discusses different types of agents including human agents, robotic agents, simple reflex agents, model-based reflex agents, goal-based agents, utility-based agents, and learning agents. It also describes the key components of an agent as perception, decision-making, action, and knowledge base. Finally, it provides an example of a self-driving car as an agent that must safely navigate road environments using sensors and actuators.