A hands-on tutorial for building intelligent agents with the Claude Agent SDK.
- Python 3.8+
- Anthropic API key
- Claude Code CLI:
npm install -g @anthropic-ai/claude-code
pip install claude-agent-sdkThis repository contains an interactive Jupyter notebook that teaches you how to:
- Use
query()for one-off tasks andClaudeSDKClientfor continuous conversations - Configure agents with custom behaviors and permission modes
- Work with built-in tools (Read, Write, Bash, etc.)
- Create specialized agents with
AgentDefinition - Build custom tools using the
@tooldecorator and MCP servers
- Clone the repository
- Open
claude_agent_sdk.ipynbin Jupyter - Follow the walkthrough from Part 1 to Part 8
