Quick Summary
| Dimension / Taxonomy | Anthropic (Dec 2024) | OpenAI Agents SDK | Andrew Ng / DeepLearning.AI |
| Primary Lens | Conceptual & Architectural Shapes | Versioned SDK Primitives | Strategy & Prompt Loops |
| Control Model | Explicit code paths (Workflows) vs. Dynamic autonomous loops (Agents) | SDK-managed loop with delegated execution | Iterative multi-prompt execution |
| Core Primitives | Chaining, Routing, Parallelization, Orchestrator-Workers, Evaluator-Optimizer | Manager (agents as tools) and Handoffs | Reflection, Tool Use, Planning, Multi-Agent Collaboration |
| Best Used For | Designing deterministic or mixed orchestration in custom code | Rapid prototyping with SDK-driven control flow and delegated tasks | Framing prompt engineering strategies at the model level |
📚 Series Navigation: Agentic Systems
Part 1: Agentic Systems - The Cognitive Architecture
Part 2:
Part 3:
Part 4:
Part 5:
1. Why Companies Define "Agentic Patterns" Differently
Searching for "agentic AI design patterns" yields three different explanations from Anthropic, OpenAI, and Andrew Ng. These frameworks overlap, but they serve different purposes:
Anthropic: Focuses on architecture patterns you build yourself in custom code.
OpenAI: Focuses on pre-built software features inside their official code library (SDK).
Andrew Ng: Focuses on prompt engineering strategies to improve model outputs.
Anthropic's guide,
2. Anthropic's Control Flow: Workflow vs. Agent
Anthropic divides AI architectures into two categories based on who controls the path of execution: the developer (Workflows) or the LLM (Agents).
Workflows (Predefined Paths)
What it is: A structured pipeline where the developer dictates the control flow via code. The AI executes specific sub-tasks along a predetermined path.
Why it is used: For predictable, repeatable business processes where reliability, auditability, and fixed SLAs are prioritized over absolute autonomy.
Pros: Highly reliable, easy to debug, testable, and significantly cheaper in token costs because you only invoke the LLM for specific steps.
Cons: Rigid. If the real-world input deviates from the expected steps, the workflow will fail because it cannot invent a new path.
Working Example (Prompt Chaining): A document processing pipeline.
Step 1: An LLM extracts entities from an invoice.
Step 2: Standard Python code checks those entities against a SQL database.
Step 3: A second LLM formats the final JSON payload.
The LLM never decides what happens next; it only completes its assigned step.
Agents (Autonomous Loops)
What it is: An autonomous system where the LLM drives the control flow. It uses a loop of perception, reasoning, and action—dynamically choosing tools and reacting to environment feedback until it determines the goal is met.
Why it is used: For open-ended tasks with an unknown number of steps, such as deep web research or multi-file code refactoring (e.g., SWE-bench tasks).
Pros: Highly flexible. It can adapt to errors, self-correct, and navigate edge cases without needing explicit hardcoding.
Cons: Prone to unpredictable latency, high token costs, and getting stuck in hallucinated, infinite loops.
Harder to debug. Working Example (Coding Agent): The LLM is given a task to fix a bug. It writes code, calls a tool to run unit tests, reads the test failure output, reasons about the error, and rewrites the code. It continues this loop entirely on its own until the tests pass.
Key Workflow Patterns
Prompt Chaining
What it is: Running tasks in a sequential pipeline where the output of one LLM call becomes the direct input for the next.
Why it is used: To break complex reasoning into smaller, focused steps, reducing the chance of the LLM losing track of instructions.
Pros: Easy to implement, highly predictable, and allows developers to inject standard code (like validation scripts) between LLM steps.
Cons: Sequential execution increases total latency.
Working Example: Step 1 extracts user intent from an email. Step 2 drafts a reply based on that intent. Step 3 translates the reply into Spanish.
Routing
What it is: Using an initial LLM (or traditional classifier) to evaluate an input and route it to one of several specialized downstream workflows.
Why it is used: To handle broad, varied inputs (like a general customer support inbox) by directing them to specialized, narrowly-prompted experts.
Pros: Keeps downstream prompts small and highly targeted, which improves accuracy and reduces cost.
Cons: If the router misclassifies the input, the entire downstream process fails.
Working Example: A router reads a support ticket. If it's a billing issue, it routes to a workflow with access to the Stripe API. If it's a technical bug, it routes to a workflow that searches GitHub issues.
Parallelization
What it is: Running multiple independent LLM calls at the exact same time, then aggregating their outputs.
Why it is used: To drastically reduce latency when a task can be broken into independent chunks.
Pros: Speed. It turns a process that would take 60 seconds sequentially into one that takes 10 seconds.
Cons: Can quickly hit API rate limits if you fan out too many concurrent requests.
Working Example: A system needs to evaluate a startup's pitch deck. It simultaneously launches one prompt to analyze the financials, one to evaluate the team, and one to check market fit. A final prompt merges the three analyses.
Orchestrator-Workers
What it is: A dynamic form of parallelization where a central "Orchestrator" LLM analyzes the task, decides how many and what kind of worker tasks are needed, and synthesizes their results.
Why it is used: When the sub-tasks cannot be predicted in advance and must be dynamically generated based on the input.
Pros: Highly flexible while still maintaining structured execution.
Cons: High token consumption and complex to orchestrate programmatically.
Working Example: A user asks, "What is the weather like in New York, London, and Tokyo?" The Orchestrator spins up three separate worker tasks to fetch the weather for each city, waits for them all to return, and writes the final summary.