Claude Cookbook: Anthropic's agentic patterns, tested and open
Anthropic has published the Claude Cookbook, a collection of practical guides with verifiable code for building production agents with Claude. These are the patterns Anthropic uses internally, distilled into runnable examples.
The recipes tackle the real problems of running agents beyond demos. Programmatic tool calling to reduce latency and tokens by having Claude write the code that invokes tools. Automatic context compaction for long sessions. Tool search with embeddings to scale to thousands of tools. Plus asynchronous multi-agent architectures, self-verification loops, SRE agents that read logs and open PRs, cybersecurity agents hunting memory bugs.
Why it matters to you. If you’re building on Claude Code or the Agent SDK, these recipes are the first public test bench for architectures Anthropic already has in deployment. As we discussed when covering orchestration, the quality of an agentic system depends more on how you circuit and verify the agent than on model power. Now Anthropic puts its closed-loop designs in plain sight.
The concrete value lies in operational details: how to manage the lifecycle of an asynchronous agent, how to structure a stateless grader that verifies every citation, how to version prompts server-side and rollback. These are architectural decisions that anyone building agents faces eventually, and seeing them solved by people who’ve been there saves weeks of trial and error.
If you want to try it, start with the entry-point recipe on Managed Agents from the Cookbook page: it has an agent fix three planted bugs in a Python package, and walks you through agent creation, file mounting, and the streaming loop.
In detail
The Cookbook arrives as the Claude agent ecosystem matures rapidly. Claude Code releases follow almost daily, and the series of fixes on permissions, sandbox, and stability show a tool aiming for daily use. The Cookbook fills the gap between “using Claude Code as an assistant” and “building production agentic systems on Claude”.
The recipes split into three families.
The first covers tool efficiency. Programmatic tool calling (PTC) makes Claude write the code that invokes tools instead of going through the classical call cycle. This cuts latency and token consumption because the model reasons over code instead of waiting for serial responses. The recipe on tool search with embeddings tackles another concrete problem: when an agent has access to thousands of tools, passing all of them in context is impractical. The solution is semantic search that dynamically selects relevant tools for each request.
The second family covers multi-agent orchestration. Two async patterns are documented: a fixed team of N agents communicating through a shared hub, and dynamically generated subagents. The specialist coordinator recipe shows an architecture where a coordinator manages three agents with different skills and tools, each with limited access to what it needs. It’s the materialization of a principle academic research had theorized and Anthropic now has in production.
The third family is what Anthropic calls Outcomes: agents that verify their own work. One recipe shows a writer producing a research brief with citations, a stateless grader checking every URL and citation against a rubric, and a revision loop that continues until the brief passes. It’s the adversarial reviewer scheme applied to an automated system.
The limits. The Cookbook is solid on patterns, but it’s vendor documentation: all recipes run on Anthropic infrastructure (Managed Agents, Agent SDK). If your architecture uses other providers or open models, the patterns transfer but the code doesn’t. The most recent recipes (June 2026) reference models like Fable 5 and API behaviors that might shift. No recipe includes measured cost or latency numbers: the savings claimed by PTC needs verification on your actual load.