Claude Cookbooks
by Anthropic
Anthropic's own runnable notebooks for everything you actually ship on Claude.
Overview
Anthropic's official collection of runnable Jupyter notebooks, at 51.5k stars and 6.1k forks under an MIT licence, showing how to do specific things with the Claude API rather than explaining them in prose. The repository is organised by capability rather than course order, so it works as a reference you dip into. Classification, retrieval-augmented generation and summarization cover the core capabilities; the tool-use directory holds the most-copied notebooks, including `customer_service_agent.ipynb`, `calculator_tool.ipynb` and `how_to_make_sql_queries.ipynb`; the multimodal directory covers vision end to end, from `getting_started_with_vision.ipynb` through `best_practices_for_vision.ipynb` to `reading_charts_graphs_powerpoints.ipynb` and `how_to_transcribe_text.ipynb`; and third-party examples wire Claude to Pinecone, Voyage AI embeddings and Wikipedia. Directories added as the platform grew, including `claude_agent_sdk`, `patterns/agents`, `skills`, `managed_agents`, `extended_thinking`, `observability`, `tool_evaluation`, `cost_optimization` and `finetuning`, track Anthropic's own agent stack rather than lagging it. Several notebooks are load-bearing for production work rather than demos: `building_evals.ipynb` for automated evaluation, `prompt_caching.ipynb`, `how_to_enable_json_mode.ipynb` for reliable structured output, `building_moderation_filter.ipynb`, and a cost-optimization checklist. Examples are Python-first but the patterns port to any SDK. You need a Claude API key, and Anthropic recommends its Claude API Fundamentals course first if the API is new to you.
At a Glance
- Topic
- Agentic
- Level
- Intermediate
- Format
- Interactive
- Cost
- Free
- Duration
- Self-paced; individual notebooks ~20-60 min each
- Provider
- Anthropic
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Call Claude's tool-use API to drive calculators, SQL queries and support agents
- ✓Build a retrieval-augmented pipeline against Pinecone with Voyage AI embeddings
- ✓Handle vision inputs including charts, slide decks and handwritten transcription
- ✓Write automated evaluations for a Claude application with building_evals.ipynb
- ✓Cut token spend using prompt caching and the cost-optimization checklist
- ✓Force reliable structured output with JSON mode and add a moderation filter
- ✓Apply Anthropic's own agent patterns via the claude_agent_sdk and patterns/agents notebooks
Highlights
- •Maintained by Anthropic itself and updated as the platform ships; the agent SDK, skills and observability directories are recent additions
- •51.5k stars and 6.1k forks, and the cookbook front page drew 343 points and 168 comments on Hacker News
- •Every recipe is an executable notebook you can run and modify, not a snippet in a blog post
- •MIT licensed, so the code can go straight into a commercial project
- •Covers the unglamorous production concerns most tutorials skip: evals, caching, cost, moderation and observability
Who It’s For
Best For
- ✓Engineers building on the Claude API who want a working reference implementation
- ✓Teams standing up evals, caching or cost controls on an existing LLM app
- ✓Developers porting an OpenAI-based prototype onto Claude
Prerequisites
- •Working Python and comfort running Jupyter notebooks
- •A Claude API key (free signup) plus a small budget for API calls
- •Anthropic suggests its Claude API Fundamentals course first if the API is new to you
FAQ
What is Claude Cookbooks?
Anthropic's official collection of executable Jupyter notebooks showing how to do specific things with the Claude API rather than explaining them in prose. Organised by capability, it spans tool use, RAG, vision, agents, evals, prompt caching and cost optimization. MIT licensed, 51.5k stars, Python-first, and a reference you dip into rather than a course you finish.
Is Claude Cookbooks free?
Claude Cookbooks is free to access.
What level is Claude Cookbooks for?
Claude Cookbooks is aimed at a intermediate audience. Recommended background: Working Python and comfort running Jupyter notebooks, A Claude API key (free signup) plus a small budget for API calls, Anthropic suggests its Claude API Fundamentals course first if the API is new to you.
How long does Claude Cookbooks take?
Expect roughly Self-paced; individual notebooks ~20-60 min each. Most learners work through it at their own pace.
What will I learn from Claude Cookbooks?
You'll learn: Call Claude's tool-use API to drive calculators, SQL queries and support agents; Build a retrieval-augmented pipeline against Pinecone with Voyage AI embeddings; Handle vision inputs including charts, slide decks and handwritten transcription; Write automated evaluations for a Claude application with building_evals.ipynb; Cut token spend using prompt caching and the cost-optimization checklist; Force reliable structured output with JSON mode and add a moderation filter; Apply Anthropic's own agent patterns via the claude_agent_sdk and patterns/agents notebooks.
Topics
Sources
This page was written from 3 sources, 2 on domains other than github.com.