MCPcopy Index your code
hub / github.com/anthropics/claude-agent-sdk-demos

github.com/anthropics/claude-agent-sdk-demos @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
632 symbols 1,280 edges 119 files 89 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Claude Agent SDK Demos

⚠️ IMPORTANT: These are demo applications by Anthropic. They are intended for local development only and should NOT be deployed to production or used at scale.

This repository contains multiple demonstrations of the Claude Agent SDK, showcasing different ways to build AI-powered applications with Claude.

Available Demos

📧 Email Agent

An in-development IMAP email assistant that can: - Display your inbox - Perform agentic search to find emails - Provide AI-powered email assistance

📊 Excel Demo

Demonstrations of working with spreadsheets and Excel files using Claude.

👋 Hello World

A simple getting-started example to help you understand the basics of the Claude Agent SDK.

🔄 Hello World V2

Examples for the V2 Session API (unstable_v2_*): separate send()/stream() instead of a single query() generator, with multi-turn conversation and session persistence patterns.

🔬 Research Agent

A multi-agent research system that coordinates specialized subagents to research topics and generate comprehensive reports: - Breaks research requests into subtopics - Spawns parallel researcher agents to search the web - Synthesizes findings into detailed reports - Demonstrates detailed subagent activity tracking

🎨 AskUserQuestion Previews

A branding assistant that renders AskUserQuestion options as visual HTML preview cards instead of plain text labels: - Opts in to previewFormat: "html" so each option includes a styled HTML mockup - Round-trips questions from the SDK's canUseTool callback to a browser over WebSocket - Demonstrates plan mode steering Claude toward clarifying questions before acting

💬 Simple Chat App

A React + Express chat UI backed by the SDK, showing a full conversation loop over WebSocket with streaming responses.

📄 Resume Generator

Generates a one-page .docx resume by web-searching a person's name (LinkedIn, GitHub, news) and assembling the findings.

Quick Start

Each demo has its own directory with dedicated setup instructions. Navigate to the specific demo folder and follow its README for setup and usage details.

Prerequisites

Getting Started

  1. Clone the repository
git clone https://github.com/anthropics/claude-agent-sdk-demos.git
cd claude-agent-sdk-demos
  1. Choose a demo and navigate to its directory
cd email-agent  # or excel-demo, or hello-world
  1. Follow the demo-specific README for setup and usage instructions

Resources

Support

These are demo applications provided as-is. For issues related to: - Claude Agent SDK: SDK Documentation - Demo Issues: GitHub Issues - API Questions: Anthropic Support

License

MIT - This is sample code for demonstration purposes.

Extension points exported contracts — how you extend this code

Email (Interface)
(no doc)
email-agent/client/components/InboxView.tsx
ImapConfig (Interface)
(no doc)
email-agent/database/email-search.ts
AIQueryOptions (Interface)
(no doc)
email-agent/ccsdk/ai-client.ts
EmailMessage (Interface)
(no doc)
email-agent/agent/email-api.ts
Chat (Interface)
(no doc)
simple-chatapp/client/App.tsx
WSClient (Interface)
(no doc)
simple-chatapp/server/types.ts
Window (Interface)
(no doc)
excel-demo/src/renderer/preload.d.ts
InboxViewProps (Interface)
(no doc)
email-agent/client/components/InboxView.tsx

Core symbols most depended-on inside this repo

log
called by 225
email-agent/agent/custom_scripts/types.ts
push
called by 101
email-agent/ccsdk/message-queue.ts
fetch
called by 20
email-agent/server/server.ts
send
called by 14
ask-user-question-previews/server.ts
write
called by 10
research-agent/research_agent/utils/transcript.py
addLabel
called by 10
email-agent/agent/custom_scripts/types.ts
ensureConnection
called by 9
email-agent/database/imap-manager.ts
openMailbox
called by 9
email-agent/database/imap-manager.ts

Shape

Method 258
Function 196
Interface 130
Class 48

Languages

TypeScript96%
Python4%

Modules by API surface

email-agent/agent/custom_scripts/types.ts47 symbols
email-agent/database/imap-manager.ts34 symbols
email-agent/database/database-manager.ts27 symbols
email-agent/database/email-search.ts23 symbols
email-agent/ccsdk/websocket-handler.ts22 symbols
email-agent/database/email-db.ts17 symbols
email-agent/ccsdk/ui-state-manager.ts17 symbols
email-agent/ccsdk/actions-manager.ts15 symbols
excel-demo/src/renderer/components/MessageInput.tsx13 symbols
email-agent/ccsdk/component-manager.ts13 symbols
simple-chatapp/server/session.ts12 symbols
research-agent/research_agent/utils/subagent_tracker.py12 symbols

For agents

$ claude mcp add claude-agent-sdk-demos \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact