Building Effective Agents
Source summary of Building Effective Agents by Erik Schluntz and Barry Zhang (Anthropic Engineering Blog, December 2024).
Central argument
The most successful LLM agent implementations use simple, composable patterns rather than complex frameworks. Start with the simplest solution possible and increase complexity only when it demonstrably improves outcomes. Many applications need nothing more than optimized single LLM calls with retrieval and in-context examples.
Taxonomy of agentic systems
The article draws a fundamental architectural distinction:
- Workflows — LLMs and tools orchestrated through predefined code paths. Predictable and consistent.
- Agents — LLMs dynamically direct their own processes and tool usage. Flexible but costlier.
Both are “agentic systems.” The choice depends on whether the task has a predictable structure (workflow) or requires flexible, model-driven decision-making (agent).
The augmented LLM
The foundational building block: an LLM enhanced with retrieval, tools, and memory. Current models actively use these capabilities — generating search queries, selecting tools, determining what to retain. Implementation should focus on tailoring capabilities to the use case and providing a well-documented interface. See Augmented LLM.
Five workflow patterns
Each pattern increases in complexity. See Agentic Workflow Patterns for the full taxonomy.
-
Prompt chaining — Sequential LLM calls where each processes the previous output. Programmatic gates between steps. Trades latency for accuracy. Example: generate marketing copy, then translate.
-
Routing — Classify input, direct to specialized handler. Separation of concerns. Example: customer service queries routed to different processes by type.
-
Parallelization — Simultaneous execution with programmatic aggregation. Two variants: sectioning (independent subtasks) and voting (same task, multiple attempts). Example: guardrails model + response model running in parallel.
-
Orchestrator-workers — Central LLM dynamically decomposes tasks and delegates to workers. Unlike parallelization, subtasks aren’t predefined. See Orchestrator-Workers Pattern. Example: coding products making changes to multiple files.
-
Evaluator-optimizer — Generator LLM + evaluator LLM in a refinement loop. Effective when clear evaluation criteria exist and iteration provides measurable value. See Evaluator-Optimizer Pattern. Example: literary translation with evaluator critiques.
Autonomous agents
Agents operate in a tool-use loop: receive task, plan, execute with tools, assess progress via ground truth (tool results, code execution), optionally pause for human feedback. Implementation is straightforward — an LLM using tools based on environmental feedback in a loop. The key investment is in tool design.
Higher costs and compounding error risk require extensive testing in sandboxed environments with appropriate guardrails.
Agent-computer interface (ACI)
The article introduces the concept of the Agent-Computer Interface as the counterpart to HCI. Invest as much effort in designing interfaces for models as for humans. Practical advice:
- Give the model tokens to “think” before committing to output
- Keep formats close to naturally occurring text
- Avoid formatting overhead (counting lines, string escaping)
- Write tool descriptions as you would a docstring for a junior developer
- Test tool usage extensively and iterate
- Apply poka-yoke: make it hard to misuse tools (e.g., require absolute paths)
Three core principles
- Simplicity — keep agent design simple
- Transparency — show planning steps explicitly
- Tool quality — invest heavily in ACI through documentation and testing
Production applications
Two domains with demonstrated value:
- Customer support — conversation flow + tool integration + measurable success (resolution-based pricing)
- Coding agents — verifiable via automated tests, structured problem space, iterative with test feedback
Connections
- The infrastructure counterpart to this design guide is Managed Agents Architecture by the same organization — that post covers the brain/hands/session split, this one covers the patterns running inside the brain
- The orchestrator-workers pattern directly maps to the “many brains, many hands” architecture in Brain-Hands Decoupling
- The emphasis on tool quality resonates with Hermes Agent’s 40+ tools and skill system — both argue that tool design matters more than prompt design
- The evaluator-optimizer pattern is structurally identical to the Agent Learning Loop: generate, evaluate, improve
- The recommendation to start simple and add complexity connects to the knowledge base’s theme around Autonomy With Acceptable Quality