Skip to main content

Design Patterns

Updated Feb 27, 2026 ·

Components and Operation

AI agents work through three main components: the model, tools, and orchestration. These components allow the agent to reason, act, and interact with the world.

Models

The model is the brain of the agent. It processes language, reasons through problems, and decides what to do next. Models can be:

TAO Cycle (Thought-Action-Observation)

The orchestration layer keeps track of memory, state, reasoning, and planning. A common way to understand orchestration is the Thought-Action-Observation (TAO) cycle.

  • Thought - The model decides the next step based on the user prompt
  • Action - The agent uses tools to perform tasks or gather information
  • Observation - The agent reflects on results and feeds them back into the next cycle

This cycle repeats until the goal is reached or a stopping condition occurs. It ensures continuous reasoning and adaptation.

Example: Customer Support Agent

A customer support agent illustrates the TAO cycle in action.

Consider a customer who was accidentally billed after forgetting to cancel a subscription.

CycleThoughtActionObservation
1Determine which tool to access customer infoAccess customer databaseFinds plan renewed 3 days ago
2Check refund policyQuery company policyPolicy allows full refunds within 7 days
3Confirm refund eligibilityInitiate refundRefund processed successfully
4Notify customerSend email and update subscriptionTicket can be closed

Each cycle builds on the previous one, which demonstrate how the agent reasons, acts, and observes until the task is complete.

Types of Model Thoughts

AI agents break problems into manageable steps. These steps come as thoughts, which guide every action and observation an agent makes.

Thought TypeDescription
Planning thoughtsBreak problems into smaller steps to solve them efficiently
Analysis thoughtsDraw insights from observations
Decision-making thoughtsChoose specific actions based on input
Problem-solving thoughtsIdentify root causes of issues
Memory integration thoughtsRemember details stored in memory
Self-reflection thoughtsEvaluate style and quality of outputs
Goal-setting thoughtsDetermine objectives needed to achieve the task
Prioritization thoughtsDecide the order of tasks based on importance

ReAct Framework

ReAct is a prompting framework that helps models organize thoughts and actions step by step. It combines reasoning (thinking) and acting (doing) to improve problem-solving.

  1. Chain-of-thought reasoning

    • Models are prompted to think step by step
    • Break problems into smaller parts
  2. Action guidance

    • See examples of actions and observations
    • Know what observations to make
  3. Observation feedback

    • Reflect on outcomes to guide next step
    • Adjust next steps based on results

Example: Simple Arithmetic Example

You can test ReAct in ChatGPT with a GPT-4 model. Suppose you want to asK:

  1. Using the normal method, we ask Chatgpt:

    Calculate the total cost of 3 laptops at $899 each with a 15% discount and 8% sales tax.

    The model then provides the answer:

    $2475.85
  2. Using ReAct-style prompting, we can use a prompt:-+

    Calculate the total cost if I buy 3 laptops at $899 each with a 15% discount and 8% sales tax. Think step by step.

    Follow this format:

    Thought: [Think about what to calculate first]
    Action: [Perform calculation]
    Observation: [Result of calculation]
    ..repeat as needed...
    Final Answer: [Complete solution]

    The model thinks step by step. Example ReAct response:

    Thought: Calculate base cost first
    Action: 3 x $899
    Observation: Base cost is $2697

    Thought: Apply 15% discount
    Action: $2697 - ($2697 x 0.15)
    Observation: Discounted price is $2292.45

    Thought: Apply 8% sales tax
    Action: $2292.45 + ($2292.45 x 0.08)
    Observation: Price after tax is $2475.85

    Final Answer: Total cost is $2475.85
    info

    Without ReAct, models can hallucinate or skip steps. With ReAct, reasoning and actions produce accurate, step-by-step results.

Why ReAct Matters

ReAct is often built into agentic tools through hidden system prompts. It guides models to reason and act correctly without needing explicit instructions.

Newer generation reasoning models are explciitly trained to think step by step, and don't need ReAct prompting. Example of reasoning models include

  • OpenAI o-series of models
  • DeepSeek R-series of models
  • Gemini thinking models

Tools

Tools are the action component of AI agents. They connect the model to external data sources and actions, which allows it to interact with the world.

Types of Tools

Agentic systems generally use three main types of tools:

  • Extensions connect to external systems via APIs or protocols
  • Functions execute custom code for specific tasks
  • Data stores retrieve structured and unstructured information

Each type of tool adds a different capability, and combining them makes the agent more versatile.

Extensions

Extensions use APIs to get real-time data. For example, a financial agent can query the Yahoo Finance API to check Nvidia’s stock price.

Model Context Protocol (MCP) is an example of an extension tool protocol that standardizes how models connect to external tools and data sources. It defines a consistent interface for exposing capabilities such as APIs, databases, or file systems to an AI model.

For more information, please see Model Context Protocol

Functions

Functions let agents run calculations or analyses. For instance, the agent can calculate moving averages to analyze stock trends when asked:

Analyze Nvidia’s stock performance over the last 30 days.

Data Stores

Data stores allow agents to read stored information like databases, documents, PDFs, emails, and videos. Using APIs, functions, and data stores together enables agents to give detailed and actionable insights.

Multi-Agent Systems

Some tasks grow too complex for a single agent. As an example, customer support queries can range from billing issues to technical, legal, and sales questions. Each query type needs access to different knowledge bases and tools.

Example queries:

Ticket TypeKnowledge ResourcesTools / Systems / APIs
Billing inquiriesInternal finance documentation, payment policy wiki, transaction logsSecure payment APIs, CRM with billing integration
Billing disputesEngineering runbooks, system architecture docs, incident postmortemsObservability tools (e.g., Datadog), ticketing system, internal dashboards
Technical issuesLegal knowledge base, compliance manuals, GDPR/CCPA documentationContract management system, legal Q&A assistant, document retrieval tools
Legal compliance questionsRecommendation engine, CRM with lead tracking, chatbot assistantProduct recommendations
Product recommendationsProduct feature matrix, customer personas, sales playbooksProduct recommendation tools / CRM

Multi-agent systems coordinate multiple agents to handle complex workflows. Instead of one model doing everything, agents specialize and work together to complete tasks efficiently.

  • Multi-agent systems split work across specialized agents
  • They can follow patterns suited to workflow needs
  • They improve accuracy and scalability compared to single agents

This approach ensures complex problems are managed effectively without overloading a single agent.

Common Multi-Agent Patterns

Manager Pattern

In this pattern, a central agent orchestrates other agents. This is ideal when one agent controls workflow and communicates with the user.

  1. Input is sent to a supervisor agent
  2. Supervisor hands task off to worker agents
  3. Workers execute their tools and report back to supervisor
  4. Supervisor responds to the user.

In most AI agent discussions, this pattern may also be referred to as Supervisor pattern. Here, only the supervisor has the ability to talk to the user and end the workflow.

Example: A head of customer support delegates tasks to billing or legal agents while managing the client conversation

Decentralized Pattern

Also called Swarm or Network multi-agents, the decentralized pattern involves handing off tasks between specialized agents. Each agent can handle requests end-to-end, including user communication

With this pattern, a default starting agent must be chosen first.

Example: A triage agent routes a ticket to a billing agent who owns the ticket fully.

Other Agent Architectures

There are also other emerging architectures and design patterns that handle reasoning, actions, and observations.