An agent is a person or thing that acts on behalf of another to produce a result or effect. In the context of computer science, an agent is a software program that can perform tasks and make decisions independently, often in the form of a robot or automated system.