This article is a practical guide written by Anthropic for developers based on experience building large language model (LLM) agents with dozens of industry teams, intended to explain how to build effective agent systems.
I. Purpose and Positioning The article notes that the most successful agent implementations often do not use complex frameworks or specialized libraries, but instead adopt simple, composable patterns. The article collectively refers to various implementations as "agent systems" and distinguishes two types architecturally: Workflows are systems that orchestrate LLMs and tools through predefined code paths; Agents are systems in which the LLM dynamically determines its own processes and tool usage and retains control over how to complete tasks.
II. When to Use and Not Use Agents It is recommended to first look for the simplest solution, adding complexity only when needed, and it may even be that no agent system needs to be built at all. Agent systems typically trade latency and cost for better task performance, and it is necessary to weigh whether this tradeoff is reasonable. For well-defined tasks, workflows provide predictability and consistency; when large-scale flexibility and model-driven decision-making are needed, agents are more suitable. Many applications can meet their needs simply by optimizing a single LLM call through retrieval and contextual examples.
III. Recommendations on Using Frameworks The article lists frameworks such as the Claude Agent SDK, AWS's Strands Agents SDK, the drag-and-drop GUI workflow builder Rivet, and Vellum, a GUI tool for building and testing complex workflows, noting that they simplify low-level tasks such as calling LLMs, defining and parsing tools, and chaining calls, but often introduce additional abstraction layers that may obscure the underlying prompts and responses, increase debugging difficulty, and tempt developers to add unnecessary complexity. It is recommended that developers start directly with the LLM API, as many patterns can be implemented with only a small amount of code; if using a framework, they should understand the underlying code to avoid problems caused by incorrect assumptions.
IV. Building Blocks and Common Patterns The basic building block is the augmented LLM, that is, an LLM enhanced with capabilities such as retrieval, tools, and memory, which can proactively generate search queries, select tools, and decide which information to retain. The article recommends focusing on two points: customizing capabilities for specific use cases, and providing LLMs with easy-to-use and well-documented interfaces; it also mentions that third-party tool ecosystems can be connected through the Model Context Protocol with a simple client implementation.
The article then introduces common patterns in order of increasing complexity:
- Prompt chaining: decomposing a task into sequential steps, with each LLM call processing the previoussecondary output, with programmatic checks that can be added at intermediate steps. Suitable for scenarios that can be clearly decomposed into fixed subtasks, trading latency for higher accuracy, for example writing marketing copy first and then translating it, or writing an outline and checking it before writing the document based on it.
- Routing: classify inputs and direct them to specialized downstream tasks, achieving separation of concerns and more specialized prompts. Suitable for complex tasks that have obvious categories that can be accurately classified and need to be handled separately, for example routing customer service queries to different downstream processes, or routing simple questions to smaller and more economical models and difficult questions to more capable models.
- Parallelization: LLMs process tasks simultaneously and aggregate outputs programmatically, divided into sectioning (splitting tasks into independent subtasks that run in parallel) and voting (running the same task multiple times to obtain diverse outputs). Suitable for scenarios that can be sped up in parallel or require multiple perspectives and multiple attempts to increase confidence, for example one model handling user queries while another screens for inappropriate content, or reviewing code vulnerabilities multiple times.
- Orchestrator-workers: a central LLM dynamically decomposes tasks, delegates them to worker LLMs, and synthesizes the results. Suitable for complex tasks where the required subtasks cannot be known in advance, such as coding products involving modifications to multiple files, or search tasks that require collecting and analyzing information from multiple sources. The key difference from parallelization is that the subtasks are not predefined but are determined by the orchestrator based on the specific input.
- Evaluator-optimizer: one LLM call generates a response, and another provides evaluation and feedback, iterating in a loop. Suitable for scenarios with clear evaluation criteria where iterative improvement can bring measurable value, for example literary translation, or complex search tasks that require multiple rounds of search and analysis.
V. Agents Agents start work from a human user's command or interactive discussion; once the task is clear, they plan and operate independently, and may return to the human to obtain information or judgment. During execution, they need to obtain "ground truth" from the environment (such as tool call results or code execution) to assess progress, and can pause at checkpoints or when encountering obstacles to wait for human feedback. Tasks usually terminate upon completion, and stopping conditions such as a maximum number of iterations are also often set. Agent implementation is usually not complex; in essence, it is an LLM using tools in a loop based on environmental feedback, so clearly designing the toolset and its documentation is crucial. Agents are suitable for open-ended problems where the required steps are difficult or impossible to predict and a fixed path cannot be hardcoded. Their autonomy is suitable for scaling tasks in trusted environments, but it means higher costs and potential accumulated errors; it is recommended to test thoroughly in a sandbox environment and set appropriate safeguards. Examples in the article include a coding agent that solves SWE-bench tasks, as well as the "computer use" reference implementation.
VI. Composition and Customization, and Core Principles These building blocks are not prescriptive solutions but common patterns that developers can shape and combine; the key to success is measuring performance and iterating on the implementation, adding complexity only when it clearly improves results. The article proposes three core principles: keep agent design simple; prioritize transparency by clearly showing planning steps; and carefully design the agent-computer interface (ACI) through thorough tool documentation and testing. Frameworks help to get started quickly, but when moving to production, do not hesitate to reduce abstraction layers and build with basic components.
VII. Limitations and Timeliness Notes The article notes that much of the tool ecosystem described in it has changed since December 2024, and that current methods can be found in Claude Managed Agents and its documentation. The article does not provide specific fee, pricing, or platform availability information.