This post is a detailed Chinese-language walkthrough of Anthropic's engineering essay Building Effective Agents (December 19, 2024, by Erik S. and Barry Zhang), arguably the most-cited definition text on AI agents. One-line takeaway from the original: *the most successful agent implementations use simple, composable patterns rather than complex frameworks.*
Key points
- Workflows vs. agents. Anthropic splits "agentic systems" into two categories that became an industry standard:
- Workflows: LLMs and tools orchestrated through *predefined code paths*. The developer lays the tracks; the LLM is an executor, not a decision-maker.
- Agents: LLMs *dynamically direct their own processes and tool use*, retaining control over how tasks are accomplished (e.g., autonomously fixing a GitHub bug by reading code, writing tests, editing files, and re-running validation).
- Many products marketed as "agents" are actually workflows — and Anthropic says that's often the right call.
- The most important sentence in the essay: > *Find the simplest solution possible, and only increase complexity when needed.*
- Five common workflow patterns (the developer's toolbox): 1. Prompt chaining — decompose a task into fixed steps, optionally with gates (e.g., generate outline → check outline → write document). 2. Routing — classify input and direct it to specialized follow-up flows (e.g., cheap model for easy queries, stronger model for hard ones). 3. Parallelization — *sectioning* (independent subtasks in parallel, e.g., one LLM handles requests while another screens for safety) and *voting* (run the same task multiple times, e.g., three code-review prompts flag issues). 4. Orchestrator-workers — a central LLM dynamically decomposes and delegates subtasks, synthesizing results (e.g., deciding which of 3 or 15 files need changes). 5. Evaluator-optimizer — one LLM generates, another evaluates, looping until quality criteria are met (e.g., literary translation refinement).
- When do you actually need an agent? When the task is open-ended: the number of steps can't be predicted, paths can't be hard-coded, and each step needs environment feedback (running tests, querying databases) to guide the next one. Costs: more expensive, slower, and errors compound — so test thoroughly in sandboxes and add guardrails.
- A counterintuitive detail: tools matter more than prompts. From Appendix 2: > *We spent more time on tool design than prompts when building SWE-bench agents.*
- On frameworks: start with direct LLM API calls; if you use frameworks (Claude Agent SDK, AWS Strands Agents SDK, Rivet, Vellum), make sure you understand the underlying code — framework misunderstanding is a top source of customer issues, and abstraction layers can hide prompts/responses and complicate debugging.
- Two proven agent use cases:
- Customer support: open-ended conversations, tool integration (customer data, order history, knowledge bases), programmable actions (refunds, ticket updates), and clear success metrics — some companies now charge only on successful resolution.
- Coding: verifiable via automated tests, structured problem space, objective quality measurement. Anthropic's agents can independently resolve real GitHub issues on SWE-bench Verified from PR descriptions, though human review remains necessary.
- Three closing principles: keep the design simple; prioritize transparency (show the agent's planning steps); and craft the ACI as carefully as a human-facing UI.
- Original: Building Effective Agents (Anthropic, 2024-12-19): https://www.anthropic.com/engineering/building-effective-agents
- Authors: Erik S., Barry Zhang
- Companion implementations in the Anthropic Cookbook
The escalation path is one-directional: simple prompts → add retrieval/examples → workflows → agents. Each step trades latency and cost for better results.
Example: instead of prompting the model to handle relative paths, Anthropic changed the tool to *require absolute paths* — the error class vanished entirely. This is the ACI (Agent-Computer Interface) principle, analogous to HCI but with an LLM as the user: empathize with the model, use poka-yoke designs, and iterate with extensive testing. If a tool needs a complicated prompt to be used correctly, the tool itself is probably poorly designed.
Bottom line
> Success isn't about building the most complex system — it's about building the right system.
Start with the simplest prompt, add retrieval when needed, then workflows, and only reach for agents when nothing simpler works. Most teams fail by picking a complex agent framework first and trying to force the problem into it; the correct order is to let the problem dictate the lightest possible tool.
References