🏗️ Anthropic AI Agent Guide: Simple Beats Complex

🏗️ Anthropic AI Agent Guide: Simple Beats Complex

This is Anthropic's most famous write-up on how to build AI agents. The biggest takeaway: the most successful implementations rely on simple, composable patterns, not complicated frameworks.

⚖️ Workflow vs Agent: A Clear Distinction

Anthropic splits agentic systems into two categories:

Workflow: the LLM follows a predefined, sequential path that is predictable. Good for clear, repeatable tasks.

Agent: the LLM decides the process itself, picks its own tools, and controls the flow on its own. Good for situations that need flexibility and model-driven decision making.

Before building an agent, optimize a single LLM call first. Agentic systems trade latency and cost for performance, and that trade-off needs careful thought.

🧩 5 Core Workflow Patterns

Pattern 1, Prompt Chaining: break a task into sequential steps, with programmatic checks between each step. Example: generate marketing copy, then translate it into multiple languages.

Pattern 2, Routing: classify the input, then send it down the right path. Example: simple queries go to a lightweight model, complex queries go to a stronger model.

Pattern 3, Parallelization: run multiple tasks at once using sectioning (splitting into independent subtasks) or voting (gathering multiple perspectives). Example: one instance answers the query while another screens for inappropriate content.

Pattern 4, Orchestrator-Workers: a central LLM dynamically breaks down tasks and delegates them to worker LLMs. Example: editing code across multiple files, where the orchestrator decides which files need changes based on the input.

Pattern 5, Evaluator-Optimizer: one LLM generates output, another LLM gives feedback. The loop repeats until the quality bar is met, much like a code review cycle between a developer and a reviewer.

🛠️ Tool Design Matters More Than Prompts

Anthropic reveals that when building their SWE-bench agent, they spent more effort optimizing tools than on the overall prompts.

Tool specifications deserve serious prompt engineering. One real example: the SWE-bench agent improved significantly simply by requiring absolute file paths instead of relative ones, which eliminated errors that used to happen after directory changes.

The "poka-yoke" principle: design tools so agents find it hard to make mistakes. Just like a USB-C connector that only plugs in one way, a tool should prevent an agent from using it incorrectly.

📋 3 Implementation Principles

Simplicity: design the simplest agent possible. Simple, composable patterns beat complicated frameworks.

Transparency: make planning steps visible so users understand what the agent is doing.

Documentation: thoroughly document and test tool definitions. A good tool description matters as much as the system prompt.

🎯 Recommended Roadmap

Step 1: optimize a single LLM call with retrieval and in-context examples.

Step 2: implement workflows for processes that are predictable.

Step 3: deploy agents only when a simpler solution isn't enough.

Don't chase complexity for its own sake. Success means building the right system for the right need. Keep measuring performance continuously and refining along the way. This article should be the first thing you read before building any AI agent.

More articles