6 Essential AI Agent Design Patterns for Efficient Workflows
This article presents six practical AI Agent design patterns—chain, parallel, routing, coordinator‑executor, generator‑evaluator (reflection), and tool‑use—explaining their concepts, typical use cases, and workflow diagrams, and shows how they improve reliability, maintainability, and performance of LLM‑driven applications.
In the previous installment we introduced the Model Context Protocol (MCP) and demonstrated a train‑ticket query service built with Spring AI MCP. By integrating FastGPT’s MCP client, the AI customer‑service system can retrieve ticket information, illustrating an entry‑level AI Agent with tool‑use capability.
Workflow vs. Agent
Anthropic’s report "Building Efficient Agents" distinguishes two notions:
Workflow : a predefined code path that orchestrates LLMs and tools.
Agent : an LLM‑driven system that dynamically decides its own process and tool usage, retaining control over task execution.
For well‑defined tasks, workflows often provide better predictability and consistency, which aligns with enterprise requirements for reliability and maintainability.
2.1 Design Pattern 1 – Chain Workflow
Analogous to an assembly line, a complex task is split into sequential steps where the output of one step automatically becomes the input of the next. The implementation follows the classic "Chain of Responsibility" pattern, allowing new processing stages to be added at any time.
Typical scenarios:
Tasks that must be performed step‑by‑step (e.g., fetch weather → plan itinerary → generate travel guide).
High‑accuracy requirements where extra processing time is acceptable (e.g., multi‑level document approval).
Dependencies where later steps rely on earlier results (e.g., cooking steps: wash → chop → stir‑fry).
Diagram:
2.2 Design Pattern 2 – Parallel Workflow
This pattern runs multiple LLM instances concurrently, then aggregates the results. Two main techniques are used:
Sharding : split a large task into independent subtasks and assign each to a different model (similar to parallel work assignments).
Voting : let several models solve the same task and select the best answer via a vote (like a meeting discussion).
Typical scenarios:
Processing many similar but independent tasks (e.g., analyzing multiple user groups in parallel).
Tasks that can run independently without interference (e.g., factory‑line style batch jobs).
Tasks that can be quickly decomposed and executed concurrently (e.g., generating multiple product descriptions at once).
Diagram:
2.3 Design Pattern 3 – Routing Workflow
The routing pattern acts like an intelligent triage desk: it classifies incoming inputs and directs them to specialized sub‑flows. Technically it equips the LLM with a routing layer that routes different problem types to dedicated prompts or handlers.
Typical scenarios:
Handling diverse question types in a customer‑service bot (e.g., inquiries, complaints, technical issues).
Problems that require domain‑specific expertise (e.g., internal‑medicine vs. surgery in a hospital).
Precise content classification needs (e.g., automated parcel sorting).
Diagram:
2.4 Design Pattern 4 – Coordinator‑Executor
Similar to a film set, a coordinator (director) orchestrates the overall plan while executors (crew) focus on their specialties. The architecture resembles a "central command + specialized units" model, offering flexibility and controllability.
Typical scenarios:
Complex tasks that cannot be fully decomposed in advance (e.g., emergency response teams).
Projects requiring multiple professional perspectives (e.g., skyscraper construction needing structural, MEP, and interior design teams).
Solutions that must adapt dynamically during execution (e.g., real‑time tactical changes in military operations).
Diagram:
2.5 Design Pattern 5 – Generator‑Evaluator (Reflection)
This pattern mirrors a writer‑editor collaboration: the generator LLM produces an initial draft, and the evaluator LLM reviews it, offering detailed feedback. The loop repeats until the output meets quality standards.
Generator LLM : creates the first response and refines it based on feedback.
Evaluator LLM : analyses the response for accuracy, completeness, and logical consistency, then suggests improvements.
Typical use cases:
Tasks with explicit quality criteria (e.g., academic papers requiring peer review).
Multi‑round iteration that significantly boosts value (e.g., A/B testing of ad copy).
Scenarios demanding near‑perfect output (e.g., screenplay revisions).
Process steps:
Generate initial output : LLM uses its pretrained knowledge to produce a draft based on the task and input.
Self‑evaluation : The evaluator checks accuracy, completeness, and logical flow, identifying missing information or logical flaws.
Optimization iteration : The generator incorporates the evaluator’s feedback, correcting errors, adding missing details, and improving structure. Multiple iterations continue until the desired quality is reached.
Real‑world example: in an AI content‑compliance project, the first model generated a response, the second model reviewed it, and the first model performed a reflective refinement.
2.6 Design Pattern 6 – Tool‑Use Pattern
The LLM can call external APIs or tools to fetch real‑time data or perform actions, making it suitable for scenarios such as live data queries or intelligent device control.
Diagram:
In the previous section we already applied this pattern by integrating the MCP tool service into an AI conversation node.
Overall Summary
The six patterns—chain, parallel, routing, coordinator‑executor, generator‑evaluator (reflection), and tool‑use—provide a reusable toolbox for building robust, maintainable, and efficient AI applications. By following these patterns, developers can avoid unnecessary complexity while delivering real value, and the patterns align with the principles outlined in Anthropic’s research and Google’s "Agentic Design Patterns" book.
Reference Patterns from Google’s Agentic Design Patterns Book
Prompt Chaining
Routing
Parallelization
Reflection
Tool Use / Function Calling
Planning
Multi‑Agent Collaboration
Memory Management
Learning & Adaptation
Model Context Protocol (MCP)
Goal Setting & Monitoring
Exception Handling & Recovery
Human‑in‑the‑Loop (HITL)
Retrieval‑Augmented Generation (RAG)
Agent‑to‑Agent Communication
Resource‑Aware Optimization
Reasoning Techniques
Safety Patterns
Evaluation & Monitoring
Prioritization
Exploration & Discovery
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ubiquitous Tech
A ubiquitous public account for pirate enthusiasts, regularly sharing curated experiences, tech learning, and growth insights. Currently publishing articles on AI RAG customer service, AI MCP technology, and open-source design. Personal free Knowledge Planet: Awakening New World Programmer.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
