agent
An agent is a system that perceives its environment, selects actions to pursue goals, and closes the loop by observing outcomes to inform future decisions.
In AI practice, this spans from reinforcement learning agents that optimize behavior in environments modeled by states, actions, and rewards, to language-model-driven agents that plan, call tools or APIs, maintain memory, and iterate over multiple steps until a task is complete.
Typical agent components include a planner or policy, an executor to carry out actions, an observation interface to read results, memory or internal state, and safeguards or constraints.
Agents differ from one-off model prompts by operating across multiple steps, interacting with external systems or environments, and adapting behavior toward long-term goals.
Related Resources
Tutorial
Pydantic AI: Build Type-Safe LLM Agents in Python
Learn how to use Pydantic AI to build type-safe LLM agents in Python with structured outputs, function calling, and dependency injection patterns.
For additional information on related topics, take a look at the following resources:
By Leodanis Pozo Ramos • Updated June 25, 2026