Anthropic's official cookbook for building Claude agents
A collection of runnable demos showing how to wire the Claude Agent SDK into real applications, from IMAP email clients to multi-agent research systems.

What it does
This repo is Anthropic’s own demo kitchen for the Claude Agent SDK. It contains eight standalone projects, each in its own directory, showing how to build different shapes of AI-powered applications: a React chat app over WebSocket, an IMAP email agent, a resume generator that web-searches and spits out .docx files, a multi-agent research system, and others. Each demo has its own README and setup instructions.
The interesting bit The demos aren’t toy scripts. The research agent spawns parallel subagents to search the web and synthesizes reports; the AskUserQuestion preview demo shows how to render HTML mockup cards instead of plain text labels, round-tripping through WebSocket to a browser. These are patterns you’d actually need when building production-adjacent tools.
Key highlights
- Hello World V2 demonstrates the
unstable_v2_*Session API with separatesend()/stream()calls instead of the older singlequery()generator - Research Agent breaks topics into subtopics, runs parallel web-searching subagents, and tracks their activity in detail
- AskUserQuestion Previews opts into
previewFormat: "html"to render styled option cards via WebSocket round-trip - Simple Chat App is a full React + Express stack with streaming responses over WebSocket
- Requires Bun (or Node.js 18+) and an Anthropic API key
Caveats
- Anthropic explicitly warns: “intended for local development only and should NOT be deployed to production or used at scale”
- The email agent is noted as “in-development”
- Support links include a GitHub Issues URL (
anthropics/sdk-demos) that doesn’t match this repo’s path (anthropics/claude-agent-sdk-demos)
Verdict Grab this if you’re evaluating or already using the Claude Agent SDK and want to see how the primitives fit together in working code. Skip it if you’re looking for a framework to drop into production; these are deliberately labeled as demos, not libraries.