All posts

Anthropic's Claude Cookbook: 15 agent patterns for startups

Huma ShaziaJuly 25, 2026 at 12:02 AM6 min read
Anthropic's Claude Cookbook: 15 agent patterns for startups

Key Takeaways

Anthropic's Claude Cookbook: 15 agent patterns for startups
Source: Hacker News: Best
  • Claude Cookbook now includes 15+ production-ready agent patterns spanning SRE automation, data analysis, and cybersecurity
  • Programmatic Tool Calling (PTC) reduces latency by letting Claude write code that calls tools directly in the execution environment
  • New multi-agent orchestration patterns support both fixed teams with peer messaging and dynamically spawned async subagents

Anthropic has published an expanded Claude Cookbook, a collection of production-ready agent patterns that show founders how to build agentic applications without reinventing the wheel. The cookbook now covers 15+ use cases, from SRE incident response bots that open fix PRs to vulnerability-detection agents that threat-model C codebases.

The timing matters. With Claude Opus 5 shipping this month and API costs falling, the bottleneck for most startups is no longer model access. It is knowing how to orchestrate tools, manage context windows, and keep agents on task across multi-turn conversations. The cookbook addresses each of these directly.

Advertisements

What patterns does the Claude Cookbook cover?

The cookbook is organized by category: Agent Patterns, Claude Managed Agents, Claude Agent SDK, and several integrations. Each entry is a self-contained notebook with runnable code. Here are the highlights.

Programmatic Tool Calling (PTC) stands out for latency-sensitive applications. Instead of the model returning JSON tool calls that your backend parses and executes, Claude writes code that invokes tools directly inside the code execution environment. Anthropic claims this reduces both latency and token consumption, though the cookbook does not publish benchmarks.

Tool Search with Embeddings solves a scaling problem. If your app exposes hundreds or thousands of tools, the model cannot hold them all in context. The cookbook pattern indexes tool descriptions as embeddings, then retrieves only the relevant subset at inference time. This is useful for startups building horizontal platforms where each customer brings their own integrations.

Automatic Context Compaction addresses the context window limit in long-running workflows. The cookbook shows how to compress conversation history on the fly so an agent can continue working without hitting the 200K token ceiling.

Also Read
Claude Opus 5 matches Fable 5 performance at half the cost

Understand the latest Claude model pricing before choosing your agent architecture

Multi-agent orchestration: fixed teams vs. spawned subagents

Two async multi-agent patterns ship in the June 2026 update. The first is a fixed N-agent team where peers message each other through a shared hub. The second dynamically spawns async subagents as needed. Both patterns are stripped to their core messaging and lifecycle mechanics, so you can adapt them without untangling application-specific code.

A more concrete example is the multiagent coordinator config. A coordinator agent runs three specialists: a web-search researcher, a file-reading librarian, and a rules-based pricer. Each specialist has a scoped toolset. Together they assemble a sales proposal. The cookbook covers the multiagent field, the thread_created and thread_message_received event types, and per-role tool scoping.

Mark Nowicki
Mark Nowicki

Agents that verify their own work

The Outcomes pattern introduces a grade-and-revise loop. A writer agent drafts a cited research brief. A stateless grader fetches every URL, checks every quote against a rubric, and returns structured feedback. The writer revises until the brief passes. This pattern uses the user.define_outcome call and span.outcome_evaluation_* events.

For founders building content or research products, this is a template for quality gates that do not require human review on every output.

Production deployment: Docker, Modal, Kubernetes

The cookbook includes a Hosting your agent tutorial that walks through three tiers of operational maturity. You build a single container image and HTTP interface, then deploy it to Docker for local testing, Modal for serverless scale, or Kubernetes for full control. The same codebase works at every tier.

This matters because many agent demos run fine in notebooks but break when you add authentication, rate limiting, and persistent storage. The cookbook shows how to handle file mounts, streaming event loops, and session management in production.

Advertisements

Domain-specific agents: SRE, data analysis, cybersecurity

Three vertical patterns stand out. The SRE incident response agent wires Claude into your on-call flow. When an alert fires, the agent reads logs and runbooks, pinpoints the root cause, opens a fix PR, and waits for approval before merging. This pairs well with Slack integrations for ChatOps workflows.

ℹ️

Disclosure

Some links in this post are affiliate links — Logicity earns a commission if you sign up, at no extra cost to you. We only link products we have used or actively recommend.

The data analyst agent turns a CSV into a narrative HTML report with interactive charts, using a sandboxed environment and file mounting. A companion tutorial shows how to build a Slack bot version where users mention the bot with a CSV and receive an analysis report in-thread. For startups already using Notion or Airtable as internal databases, piping exports to this agent could replace ad hoc analyst requests.

The vulnerability detection agent uses the Claude Agent SDK to threat-model a C target, hunt memory-safety bugs with built-in file tools, and triage findings into a structured report. Security startups or teams running internal bug bounties can adapt this as a first-pass triage layer.

Also Read
Uniti AI raises $12M to automate property operations

See how another startup is deploying AI agents for vertical workflows

How does Claude Cookbook compare to LangChain and CrewAI?

The cookbook is not a framework. It is a set of reference implementations. LangChain and CrewAI provide abstractions; the cookbook provides patterns you can copy and modify. For teams that want to stay close to the metal, the cookbook is more transparent. For teams that want batteries-included orchestration, a framework still makes sense.

ResourceTypeModel Lock-inProduction Guidance
Claude CookbookReference notebooksClaude onlyDocker, Modal, Kubernetes tutorials
LangChainFrameworkModel-agnosticLangServe for deployment
CrewAIFrameworkModel-agnosticCrew deployment tools

Billing changes and Fable 5 fallback

A separate cookbook entry covers classifier fallback for Claude Fable 5. When a safety classifier blocks a request on Fable 5, the cookbook shows how to fall back to Opus 4.8 using server-side or SDK-based client-side fallback. The entry also documents streaming behavior and new billing changes, though specific pricing is not disclosed in the source.

ℹ️

Logicity's Take

The cookbook fills a real gap. Most AI documentation explains what an API can do, not how to structure a production system around it. For early-stage founders, these patterns cut weeks off the build cycle. The multi-agent orchestration and self-verification patterns are particularly useful for products where output quality must be auditable. Competitors like LangChain offer similar orchestration but with more abstraction and less visibility into what is happening under the hood. If you are building on Claude, start here before reaching for a framework.

Also Read
OpenAI adds Apple Health to ChatGPT one day after lawsuit

Compare how OpenAI is expanding ChatGPT integrations

Frequently Asked Questions

Is the Claude Cookbook free to access?

Yes. The cookbook is published on Anthropic's platform at platform.claude.com/cookbook and all notebooks are freely accessible.

Can I use Claude Cookbook patterns with other LLMs?

The patterns are written for Claude's API and Agent SDK. You would need to adapt the code for other providers since tool-calling conventions and streaming formats differ.

What programming language does the cookbook use?

The cookbook uses Python for all code examples and reference implementations.

Does the cookbook cover fine-tuning Claude?

No. The cookbook focuses on agent orchestration, tool use, and deployment, not model training or fine-tuning.

ℹ️

Need Help Implementing This?

Logicity works with startups building AI-native products. If you need help architecting your agent system or evaluating which cookbook patterns fit your use case, reach out at hello@logicity.in.

Source: Hacker News: Best

H

Huma Shazia

Senior AI & Tech Writer

Produced with AI assistance and reviewed by the Logicity editorial team. Learn more in our Editorial Policy.