An agent in Artificial Intelligence is one of the two key components needed for the state to function. The other component is the environment where the agent works in. An agent function is considered as the map of the sequential inputs that the agent has received in the past while the agent program is the actual implementation of the agent function. In simple words, an agent = Agent Program + Architecture. There are software agents like file contents, keystrokes while human agents have organs to perceive senses. Similarly, robotic agents have cameras and range finders which help them with assessing the environment around them effectively. In the world of AI, there are many types of agents such as Simple Reflex, Model-Based, Goal-based, and Utility-Based agents.
If you are looking for an online course to learn Artificial Intelligence, check out this Artificial Intelligence Training program by Intellipaat.