Let's talk

Agentic Patterns

What are the 5 Types of AI Agents?

To build reliable AI software, you must move beyond simple chatbots. Understanding these five core agentic patterns is essential for designing effective agentic architecture.

By Divyaprakash JhaUpdated 5 min readTopic: Agentic AI

Photo for What are the 5 Types of AI Agents?

The 5 Essential AI Agent Patterns

AI agents are categorized by how they reason and interact with tools. The five core patterns are ReAct, Plan-and-Execute, Router, Orchestrator-Workers, and Evaluator-Optimizer.

To build reliable software, you shouldn't just throw a prompt at a model and hope for the best. Instead, you use specific architectural patterns. For example, a small retail business in Mumbai might use a Router to send customer complaints to a human, while using a Plan-and-Execute pattern to automate monthly inventory reconciliations. Understanding these patterns helps you decide which tool is right for the specific job.

  • ReAct (Reason + Act): This pattern interleaves short reasoning steps with actual tool calls. The model thinks, acts, observes the result, and thinks again. It is the default choice for open-ended tasks like research or troubleshooting.
  • Plan-and-Execute: The model first drafts a complete, step-by-step plan for the entire task. An "executor" then works through that plan. If a step fails, the system re-plans. This is excellent for tasks where you need to review the approach before any action is taken, such as migrating a large database.
  • Router: A small, fast model acts as a traffic controller. It classifies incoming requests and sends them to specialized paths. For instance, a router can send billing questions to a specific workflow and appointment requests to another.
  • Orchestrator-Workers: An orchestrator breaks a complex task into smaller subtasks. It then hands these subtasks to "worker" agents (which might be the same model but with narrower instructions) and finally combines their results into a single answer.
  • Evaluator-Optimizer (Reflection): This is a feedback loop. One step produces a draft, a second step critiques that draft against specific criteria, and the first step revises the work based on that feedback. This is highly effective when the criteria are concrete, such as "ensure every claim cites a specific document."

Agent vs. Chatbot vs. Workflow

In the industry, the term "agent" is often used loosely. To build real software, you must distinguish between three distinct types of AI interaction. Getting this wrong can lead to systems that are too expensive or too unpredictable for production use.

Feature Chatbot Workflow AI Agent
Who decides the next step? The user (one message at a time) The developer (fixed in code) The model (at run time)
Use of tools Rarely Yes, at fixed points Yes, chosen per step
Steps per task One reply Fixed and known Variable and often unknown
Predictability High High Lower; requires guardrails

The most effective production systems are often hybrids. You might use a highly predictable workflow for the outer shell of your application, while placing an agentic step inside it where the system needs to handle unexpected user input or complex reasoning.

How an AI Agent Operates: The Loop

An agent is not just a single prompt; it is a program running a continuous loop of logic. Whether you are using a simple script or a complex platform like Shiva Agents, every agent follows a fundamental cycle to reach a goal.

  1. Plan: The model decides what to do next. It might decide to perform a single action or draft a full sequence of steps.
  2. Act: The agent calls a tool. This could be an API call to a delivery service, a database query, or writing a new file.
  3. Observe and Verify: The agent reads the result of the tool. It checks: "Did the API return an error? Did the invoice total match the bank statement?"
  4. Remember: The agent records the outcome. This "memory" ensures it doesn't repeat the same mistake in the next step.
  5. Repeat or Stop: If the goal is met, the agent reports the result. If not, it starts the loop again with the new information it has gathered.

Key Components of Agentic Architecture

To move from a simple demo to a professional system, you need to understand agentic architecture. This is the design of the software that wraps around the model to make it useful and safe.

The Core Building Blocks

  • The Model: The decision-maker. It reads the goal, the history, and the tool results to choose the next action. For production, it is often wise to use a strong model for planning and a smaller, cheaper model for routine classification.
  • Tools: These are the "hands" of the agent. They are functions the model can trigger, such as send_whatsapp(phone_number) or search_invoices(month). A good tool has a narrow scope and provides clear error messages.
  • Memory:
    • Working Memory: The current conversation context (the "short-term" view).
    • Episodic Memory: A record of past runs, allowing the agent to learn from previous mistakes.
    • Long-term Memory: Retrieved via search (RAG), containing massive amounts of company policy or customer history.
  • Verifier: A mechanism to check the agent's work. This can be a simple piece of code (e.g., checking if a sum is mathematically correct) or a second AI model acting as a reviewer.

Ensuring Reliability and Safety

For business owners, the biggest fear is an agent "going rogue"—spending too much money or sending incorrect information to a client. You cannot rely on the model's "good behavior" to prevent this. You must implement technical guardrails.

Safety Mechanisms

  • Guardrails: These are rules enforced by your code, not the model. You set hard limits on spending, block specific domains, or restrict which tools can be called.
  • Human Approval: For high-stakes actions—like issuing a refund or deleting a database record—the agent should reach a "pause point." The process stops and waits for a human to review and click "Approve."
  • Deterministic Checks: Whenever possible, use standard code to verify logic. If an agent calculates a total, use a simple Python script to verify the math. Do not ask the AI to "double-check its math" if a basic calculator can do it more reliably.

Multi-Agent Topologies

Sometimes, one agent isn't enough. You might need a team of specialists. This is known as a multi-agent system. There are several proven ways to organize these teams:

Assembly-line
Each agent has one specific role and hands a completed "artifact" to the next agent in the chain.
Group Chat
A "speaker selector" decides which agent should talk next in a continuous conversation.
Debate
Two agents argue different sides of an issue while a third "judge" agent decides the winner.
Manager and Crew
A high-level manager agent plans the work and assigns specific subtasks to a crew of specialized workers.
Handoff Network
Agents pass control to the most appropriate specialist for the current step, similar to a customer service transfer.

Moving from Demos to Production

A demo is a single loop running in a notebook. A production system is a piece of infrastructure. To make your agentic AI reliable for real-world business, you must solve for durability.

If your server restarts mid-task, a production agent must be able to resume exactly where it left off. This requires checkpoints—saving the state of the agent after every single step. You also need a complete audit trail (such as hash-chained logs) so you can see exactly why an agent made a specific decision. Without these, you cannot debug, you cannot audit, and you cannot scale.

For more practical applications of these concepts, see our guide on agentic AI examples in real life.

Yellow robotic arm operating inside a glass enclosure with a monitor above.
Photo: Robot arm works on a small component in a lab setting by Shixart1985, CC BY 2.0

Questions people ask

What is the main difference between an AI agent and a chatbot?

A chatbot typically provides a single reply to a question, whereas an AI agent takes a goal and decides its own sequence of steps and tool calls to reach it.

When should I use a 'Plan-and-Execute' pattern?

This pattern is best for tasks where the steps need to be visible and reviewable before execution, such as migrating large datasets.

Do AI agents always require a human in the loop?

Not always, but for risky or critical actions, human approval acts as a necessary guardrail to ensure safety and control.

What is the purpose of an 'Evaluator-Optimizer' agent?

It uses a reflection process where one step critiques a draft against specific criteria so the agent can revise and improve the output.

What makes an agentic architecture 'reliable'?

Reliability comes from wrapping the model in a loop of ordinary, testable software that includes verifiers, guardrails, and durable checkpoints.