An AI agent is a software system that autonomously performs tasks and makes decisions for a user while pursuing specific goals. It uses a language model to reason about context, act through external tools or APIs, and interact with users or other agents. A simple prompt-in, output-out application is not necessarily agentic; many systems labeled agentic are closer to robotic process automation. section 13.4
Agents address limitations of standalone language-model interactions by combining:
- Reasoning: analyzing a prompt and context, determining next steps, and breaking complex problems into smaller tasks. section 13.4
- Action: selecting and calling external tools, APIs, search systems, databases, or code interpreters. section 13.4 section 13.5
- Interaction: communicating with users or other agents while pursuing a shared task. section 13.4
- Memory and refinement: managing short- and long-term context, obtaining current information, and revising initial answers. section 13.4
- Execution control: iterating through reasoning and acting, chaining tool outputs, and limiting workflows with a step budget. section 13.5
Flight search, seat selection, and booking
A CodeAgent receives “Find a flight from Dublin to New York and then select a seat.” It searches for flights, passes a selected flight code to a seat-finding tool, and can then call a booking tool. The workflow demonstrates planning, tool selection, and multistep chaining; custom tools expose domain-specific operations through typed functions and docstrings. section 13.5
Agents can also extend retrieval-augmented generation. In agentic RAG, an agent performs multistep retrieval, updates queries when results are inadequate, and chooses among local vector search, keyword search, and web search before generating an answer. This pattern supports customer support, research assistance, knowledge management, and domain-specific problem solving. section 14.2
































