No history yet

Agentic Design Patterns

Beyond Prompt and Response

Basic tool-calling is useful, but it's fundamentally reactive. You give a prompt, the model calls a tool, and you get a response. This works for simple tasks, but complex, real-world problems require a system that can strategize, adapt, and correct itself. This is where agentic design patterns come in. They provide blueprints for building AI agents that don't just follow instructions, but actively pursue goals.

Agents That Think Twice

One of the simplest yet most powerful patterns is Reflection. Instead of delivering its first attempt, a reflection-enabled agent critiques its own work. It asks itself questions like: "Does this answer fully address the user's goal?" or "Are there any logical inconsistencies here?" This process of self-correction is a powerful way to reduce errors and combat AI before the output ever reaches a human.

Think of it as an internal quality assurance step. The agent generates a draft, then a separate “critic” instance of the model reviews it against a checklist before finalizing the answer.

From Goals to Actions

Self-correction is a great defense, but a good offense starts with a solid plan. For complex business objectives, you can't just react. You need to decompose the goal into a series of concrete steps. This is the core idea behind the architecture.

An agent using this pattern first creates a complete, step-by-step plan to achieve the user's high-level goal. For example, if the goal is "Analyze Q3 sales data and create a summary presentation," the planner might generate a sequence like:

  1. Access the sales database.
  2. Query sales figures for July, August, and September.
  3. Aggregate data by region and product category.
  4. Identify top 3 performing products.
  5. Generate charts for regional performance.
  6. Create a slide deck with key findings and visuals.

Only after this entire plan is formulated does the execution phase begin, where a separate agent (or the same agent in a different mode) carries out each task sequentially.

Reasoning and Acting in a Loop

Plan-and-Execute is robust, but it can be rigid. What happens if step 2 fails, or the data from step 3 reveals something unexpected? The original plan might become obsolete. The ReAct pattern solves this by creating a tighter, more adaptive loop between thought and action.

ReAct stands for Reason + Act. It's a simple but profound shift: the agent thinks about the next single step, takes that step, observes the result, and then thinks again.

Instead of creating a full plan upfront, a operates in a cycle:

  1. Reason: Based on the goal and current state, the agent decides on the very next action to take.
  2. Act: The agent executes that single action (e.g., calls one specific tool or API).
  3. Observe: The agent analyzes the outcome of its action.

This observation then feeds back into the next reasoning step. If a tool call fails, the agent can reason about why it failed and try a different approach. If the results are unexpected, it can adjust its next action accordingly. This verification-driven execution makes the agent far more resilient to errors and dynamic environments, which is essential for building reliable automation.

These patterns—Reflection, Plan-and-Execute, and ReAct—are not mutually exclusive. The most sophisticated agents often combine them, creating a plan, executing each step with a ReAct loop, and reflecting on the final outcome to improve future planning. Mastering these foundational blueprints is the key to building truly intelligent and reliable AI systems.

Quiz Questions 1/5

An AI agent is tasked with analyzing quarterly sales data. Instead of generating a full report immediately, it first produces a draft. Then, it internally asks, "Does this draft directly answer the prompt? Are the calculations correct? Is the summary clear?" before presenting the final version. Which agentic design pattern is primarily being used here?

Quiz Questions 2/5

Which statement best describes a primary weakness of the Plan-and-Execute pattern?