Loading...

The Top 16 GenAI Patterns, agentic vs non-agentic

The 16 patterns most production GenAI systems use, split between the ones that act on the world and the ones that stay inside the prompt.

Eight patterns that act on the world, seven that reason inside the model, and one that crosses the line. Each comes with a diagram, the paper that started it, and notes from the field on where it shows up in real systems.

The two kinds of GenAI system

Every GenAI system in production leans one of two ways. Some reach outward and call tools, hit APIs, browse the web, take action. Others stay inward and think harder, longer, more carefully, but never leave the prompt. The choice is not stylistic. It decides cost, latency, how easy the system is to debug when it misbehaves, and what kinds of mistakes it can make.

The deciding question is always the same. Does feedback come from the world, or from the model itself? Agentic patterns close their loop on real outcomes. Non-agentic patterns close it on the model's own evaluations.

Each of the sixteen patterns has a diagram and a short writeup. Skip around and read what fits the problem you are working on right now. The rest is reference for later.

Agentic Patterns · Action-Oriented Intelligence

An agentic system acts on the world. It calls tools, hits APIs, watches the response, and decides what to do next. The feedback loop closes in reality, not in the prompt. Real systems are messy, and any agent that depends on them inherits the mess.

Reach for an agentic pattern when the answer depends on data you do not already have. Or when the task requires changing real state, or when the user expects the system to follow up on its own work.

01 · ReAct (Reasoning + Acting)

The agent alternates between thinking and acting. It writes a thought, something like what should I check next, takes an action (a tool call or API request), reads the result, and uses what it learned to write the next thought. The loop runs until the goal is met.

Stripped to its essentials, a ReAct loop is about 15 lines of Python on top of any modern function-calling API. The Thought lives in the assistant message content, the Action lives in tool_calls, and the Observation is the tool result you append before the next turn.

02 · Reflexion (Verbal RL)

After each attempt, the agent looks at what actually happened and writes a short reflection on why it failed. The reflection goes into memory. Next time the agent tries, it reads its own past reflections first. No weight updates, no fine-tuning, just a growing journal of what not to do again.

03 · Function Calling / Tool Use (with MCP)

Two complementary layers that ship together as one pattern in 2026. At the model layer, the LLM emits a structured JSON tool call instead of plain text. At the architecture layer, MCP (Model Context Protocol, Anthropic, Nov 2024) standardises how the host connects to many tools.

An MCP client speaks one protocol to many MCP servers, where each server wraps an external system and exposes tools, resources, and prompts over stdio or HTTP+SSE. Adding a new tool becomes a config change instead of an integration project.

Toolformer (Schick et al., 2023) showed for the first time that an LLM could learn when and how to call APIs without explicit human supervision. Modern function calling does not literally use Toolformer's self-supervised method. The labels come from RLHF and post-training instead. But the conceptual lineage is real. Toolformer made the case that tool use should be a first-class capability of the model, and that idea is now the default in every major API.

04 · Plan-and-Execute

A planner LLM writes out an ordered plan of subtasks. An executor (usually a smaller, cheaper model) walks the plan one step at a time. A replanner only kicks in when reality disagrees with what was planned. The trade is straightforward. You spend more tokens up front on planning, and save them later by not re-deciding the strategy on every step. It is the default choice in 2026 for any agent that needs to take more than a handful of actions. LangGraph's plan_and_execute and OpenAI Deep Research are the references to study.

05 · Multi-Agent Collaboration (incl. Orchestrator-Worker)

Several specialised agents work on the same goal by passing messages to each other. Each agent has its own role and its own tools. The most common shape is Orchestrator-Worker. A supervisor agent breaks the goal into subtasks, hands each one to a worker (a researcher, a writer, a reviewer), then collects the results, handles any failures, and produces the final output. Hierarchical, sequential, and peer-to-peer setups exist too, but Orchestrator-Worker is what most production systems start with.

06 · Retrieval-Augmented Generation (RAG)

Before the model answers, a retrieval step pulls relevant content from external knowledge (a database, a document store, or the web) and slips it into the prompt. The model is no longer limited to what it learned during training. The answer is grounded in whatever was just retrieved.

07 · Deep Research Agents

A deep research agent plans an investigation, runs multi-hop retrieval across many sources, browses dynamic web pages, and adjusts its plan as it finds new information. At the end it puts together a structured report. What sets these agents apart is autonomous depth. They run for minutes or hours of unattended work on a single query.

08 · Agent-Computer Interface (ACI)

ACI is the idea that the surface an agent calls should be designed for the agent, not for a human. That means simple commands, compact operations, clear feedback after each step, and explicit ways to recover from errors. The SWE-agent paper from Princeton and Stanford was the first to lay this out for software engineering tasks. The same principles now show up in Anthropic Computer Use, OpenAI Operator, and Agent S.

Non-Agentic Patterns · Cognitive Intelligence

A non-agentic system stays inside its own head. The prompt goes in, the model thinks, the answer comes out. No tools, no APIs, no side effects on the world. That sounds limiting until you remember how much of what we actually need from an LLM is already sitting in the prompt. The reasoning is the work, and the patterns in this section are the techniques that pull it out cleanly.

Reach for a non-agentic pattern when the answer is fully expressible from what is already in the prompt. Or when latency or determinism matters, or when you cannot afford the operational complexity of tool use and side effects.

09 · Chain-of-Thought (CoT)

Add let's think step by step to the prompt, or include a few worked examples, and the model writes out its intermediate reasoning before giving the final answer. This is the prompt that turned LLMs from word completers into multi-step problem solvers.

10 · Tree of Thoughts (ToT)

At each reasoning step the model generates several candidate next-thoughts and scores them against the goal. It explores the most promising branches with BFS or DFS, and backtracks when a branch turns out to be a dead end. CoT writes one line of reasoning. ToT writes a tree.

In 2026, reasoning models like OpenAI o3 and o4-mini, Claude with extended thinking, and Gemini 2.5 Deep Think do something like ToT inside the model. They spend test-time compute on internal exploration before answering. If you are using one of these models, you may not need to implement ToT yourself. Reach for explicit ToT when you need the search structure to be visible, controllable, or auditable.

11 · Self-Refine

One LLM is both writer and reviewer. It writes a draft, critiques its own output for errors and weak spots, then rewrites based on the critique. The loop runs until the result is good enough. The simplest non-agentic self-improvement pattern, and surprisingly effective on coding and writing tasks.

12 · Plan-and-Solve

A two-step prompt. First the model writes a high-level plan. Then it works through each step with careful calculation. A zero-shot improvement over plain CoT on multi-step problems, and the prompt-only cousin of Plan-and-Execute (#04).

13 · Meta-Prompting

One LLM plays several expert roles inside a single response. A conductor breaks the task apart, routes each sub-question to a virtual specialist (a lawyer, a doctor, an engineer), and combines their answers into a coherent reply. There is no real multi-agent system here. It is structured role-play, all happening inside one model.

14 · Multi-Agent Debate

Several virtual agents each propose an answer, critique one another, refine their positions, and gradually converge on a consensus. All of this happens inside one model with no real tool use. The back-and-forth raises factuality and lowers hallucination rates compared to a single answer pass.

15 · Chain-of-Verification (CoVe)

The model writes a baseline answer, then writes verification questions about its own claims. It answers each question independently, on a clean slate, so the original chain of thought cannot bias the check. Finally it revises the answer based on what the verifications turned up. A structured self-audit that noticeably reduces hallucinations.

Hybrid · Self-Evolving Agents

This last one does not sit on either side of the line. A self-evolving agent updates itself over time, sometimes the weights, sometimes the prompts, sometimes the memory, sometimes the whole architecture. When the feedback driving the change comes from the world, the agent is acting on reality, so it sits with the agentic patterns. When the feedback comes from the agent grading itself in a sandbox, it sits with the non-agentic ones.

16 · Self-Evolving Agents (Borderline Hybrid)

Most teams will never need this in practice. Master the other fifteen patterns first. A system that mutates its own runtime can break itself in ways you have not yet learned to debug.

At-a-Glance Comparison

A quick lookup table for what each pattern does and what kind of interaction it requires. Use it when you are picking a starting pattern. Jump back up to a pattern's section for the diagram and the source paper.

Agentic patterns

PatternKey actionExternal interactionCost & latency
ReActTool executionAPIs, tools, databasesMedium · 1 LLM call per loop iteration. Cap iterations
ReflexionTask execution + verbal RLEnvironment feedback + episodic memoryMedium-High · Action + Eval + Reflect each cost a call
Function Calling / MCPNative structured tool callsMCP servers, registries, function APIsLow · 1-2 calls. Pay only for the tools that fire
Plan-and-ExecuteTwo-phase plan then executePlan steps + tool executionPlan upfront with big model, execute cheap. Net medium
Multi-Agent CollaborationSpecialised agents collaborate (incl. Orchestrator-Worker)Message passing between agentsHigh · 3-5x single-agent cost. Coordination overhead
RAGInformation retrievalDatabase / vector store queriesLow-Medium · 1 retrieval + 1 generation. Cheap to scale
Deep ResearchMulti-turn researchWeb, APIs, browsersVery High · minutes-to-hours of compute per query
ACIComputer controlGUI, CLI, file systemHigh · screenshot + reasoning per action. Latency real

Non-agentic patterns

PatternKey featureInteraction typeCost & latency
Chain-of-ThoughtStep-by-step reasoningInternal onlyLow · 1 call, slightly more output tokens
Tree of ThoughtsPath exploration with backtrackingInternal onlyHigh · multiple calls per branch + scoring
Self-RefineSelf-critique + rewrite loopInternal onlyMedium · 2-3 calls per refinement cycle
Plan-and-SolvePlan first, then solveInternal onlyLow · 1-2 calls
Meta-PromptingMultiple expert personasInternal onlyLow-Medium · 1 long call covering all personas
Multi-Agent DebateVirtual agents critique each otherInternal onlyMedium-High · N agents x rounds of debate
Chain-of-VerificationSelf-audit via verification questionsInternal onlyMedium · 1 baseline + N verification calls

When to Reach for Which

When choosing between patterns, work from the failure mode you are seeing right now. The wrong answer is never we should use a more sophisticated pattern. It is picking an agentic pattern when the work fits in one prompt, or a non-agentic one when the answer depends on data you do not have.

Use agentic patterns when you need...

Use non-agentic patterns when you need...

Pair an agentic and a non-agentic pattern

The two families combine well. The non-agentic pattern shapes the thinking, the agentic pattern grounds the result in the real world. A few combinations that show up often in production.

Always wrap the high-stakes ones in HITL

Human-in-the-loop is not a pattern in this catalogue because it is not a reasoning shape. It is a guardrail that sits on top of any of these. Whenever an agent can spend money, change production state, send a message on someone's behalf, or take an irreversible action, route the decision through a human approval step before execution. ACI agents (Computer Use, Operator) and Plan-and-Execute agents in enterprise workflows almost always run with HITL on the destructive operations. The cost of the extra latency is small. The cost of the agent acting wrongly is not.

The patterns layer cleanly. Some nest inside others (Function Calling lives inside almost every agentic loop, MCP lives inside Function Calling), and most production systems combine three or four. Start with the simplest combination that solves the problem. Add complexity only where the failure analysis demands it.

Pattern catalogues are reference material, not curriculum. Pick what fits the failure mode you are actually seeing. The best architecture is the one with the fewest moving parts that still works in production.