Section 10.7.1 : What is an AI agent? Architecture and concepts
π― Learning objective
Understand what an AI agent is, how it works (perception-reasoning-action loop), and why agents represent the next revolution after chatbots. You'll learn to distinguish different types of agents, understand their internal architecture, and identify use cases where an agent is more suited than a simple chatbot.
From chatbot to agent: a conceptual leap
A chatbot (ChatGPT in classic conversation mode, Claude) answers your questions one by one. It is reactive β it waits for your input, produces a response, and stops.
An AI agent is fundamentally different: it is proactive. It receives a goal (not just a question), plans the necessary steps, uses tools (web search, calculations, code execution, email sending...), observes results, adapts if something doesn't work, and continues until the desired result is achieved β all with minimal human intervention.
Analogy: a chatbot is like an employee who answers the phone and only responds to questions asked. An agent is like an autonomous employee to whom you say "organize next week's conference" β and they plan, book the room, send invitations, prepare materials, and tell you when it's done.
The 4 components of an AI agent
1. The LLM (brain): the language model that reasons, plans, and decides which actions to take. GPT-5, Claude Opus 4.6, Gemini 3.1 Pro are the most commonly used brains for agents in 2026. The model choice determines reasoning quality and planning capability.
2. Tools (hands): the agent's action capabilities. Each tool is a "function" the agent can call:
- βWeb search (to find current information)
- βCode execution (to calculate, analyze data, create charts)
- βFile reading/writing (to manipulate documents)
- βAPI calls (to interact with external services: email, CRM, calendar...)
- βWeb navigation (to visit sites, fill out forms)
3. Memory (context): what the agent "remembers" during its mission:
- βShort-term memory: conversation history and recent action results
- βLong-term memory: persistent knowledge (RAG, databases)
- βWorking memory: the current plan, completed steps, remaining steps
4. The reasoning loop (autonomy): the mechanism that allows the agent to:
- βEvaluate its progress toward the goal
- βDecide on the next action
- βExecute the action
- βEvaluate the result
- βAdjust the plan if necessary
AI agent architecture
The ReAct loop (Reasoning + Acting)
Most modern agents follow the ReAct pattern, which explicitly alternates between reflection and action:
Concrete example β the agent receives: "What is our main competitor's revenue in Q4 2025, and how does it compare to ours?"
- βThought (reflection): "I first need to identify the main competitor. I'll search our internal database."
- βAction: Call to CRM tool β query "main competitor"
- βObservation: "The CRM indicates that the main competitor is TechCorp Inc."
- βThought: "Now I need to find TechCorp's Q4 2025 revenue. This info is probably public if it's a listed company."
- βAction: Web search β "TechCorp Inc revenue Q4 2025"
- βObservation: "According to the annual report, TechCorp made $45M in Q4 2025."
- βThought: "Now I need to find our own Q4 2025 revenue for comparison."
- βAction: Call to internal database tool β Q4 2025 sales query
- βObservation: "Our Q4 2025 revenue = $38M."
- βThought: "I have both figures. I can calculate the gap and produce the report."
- βFinal Answer: "TechCorp achieved $45M in Q4 2025, 18.4% more than our revenue of $38M. The gap narrowed compared to Q3 (where it was 25%). Sources: TechCorp annual report, internal CRM."
Why ReAct is powerful: the model "thinks out loud" at each step. This allows:
- βBreaking down a complex problem into manageable steps
- βChoosing the right tool for each step (not a single tool)
- βVerifying consistency before continuing (self-correction)
- βProviding traceable reasoning (the agent's logic can be audited)
Types of agents in 2026
| Type | Example | Autonomy level | Typical use case |
|---|---|---|---|
| Tool-augmented assistants | ChatGPT + Code Interpreter + Search | Medium β one tool at a time, human-guided | Data analysis, quick research |
| Research agents | Perplexity Deep Research, Gemini Deep Research | Medium β multi-source, autonomous in research | Competitive intelligence, market studies |
| Code agents | GitHub Copilot Agent, Claude Code, Grok Code Fast 1 | High β write, test, and deploy code | Software development, debugging |
| Task agents | Anthropic Claude Computer Use, Adept ACT-1 | High β control the screen, click, navigate | Interface automation, data entry |
| Multi-step agents | AutoGPT, BabyAGI, CrewAI | Very high β fully autonomous planning | Deep research, complex projects |
| Enterprise agents | Salesforce Agentforce, Microsoft Copilot Studio | High β integrated with business data and workflows | Intelligent CRM, customer support |
Agents in daily life: you're already using them
You're probably using agents without knowing it:
- βChatGPT with Code Interpreter: when you upload an Excel file and ask for analysis, ChatGPT writes Python code, executes it, observes the result, adjusts if needed β that's an agent
- βPerplexity Deep Research: when you ask a complex question, Perplexity plans multiple search queries, consults dozens of sources, synthesizes β that's a research agent
- βMicrosoft Copilot: when you ask "summarize this week's important emails and plan my replies," it accesses Outlook, analyzes, prioritizes, drafts β that's an agent
- βClaude Code: when a developer says "add unit tests for this function," Claude reads the code, understands the logic, writes the tests, runs them, fixes errors β that's a code agent
Risks of autonomous agents
The more autonomous an agent is, the higher the risks:
Risk 1 β Amplified hallucination: a chatbot that hallucinates produces a bad answer. An agent that hallucinates can send an erroneous email, modify a file with false data, or make a decision based on flawed reasoning.
Risk 2 β Irreversible actions: an agent that deletes a file, sends an email, or makes a purchase can't easily "undo."
Risk 3 β Infinite loops: a poorly designed agent can get stuck in a reasoning loop without ever reaching the goal.
Best practices:
- βHuman-in-the-loop: the agent asks for confirmation before irreversible actions
- βBudget limits: cap the number of iterations and API cost per execution
- βComplete logging: record every thought/action/observation for audit
- βSandbox: test agents in an isolated environment before production
Autonomy β Hands-off
An autonomous agent doesn't mean an unsupervised agent. In 2026, best practices recommend a "trust but verify" model: the agent acts autonomously for low-risk tasks (research, analysis, drafting) and requests human validation for high-risk tasks (sending emails, publishing, modifying data).
What is the fundamental difference between a chatbot and an AI agent?
What are the 4 essential components of an AI agent?