Reference — examples by number
This page lists every shipped example by number with a one-line summary. Use it when you know the file number and want to jump straight to the source. For discovery by topic, start with Tutorials or Learn the SDK.
There are 47 shipped examples. The first 32 demonstrate individual SDK capabilities. The last 15 are full walkthroughs with sibling READMEs.
Quickstart
| # | Example |
|---|---|
| 01 | hello_agent — pip install && python → working agent |
SDK basics
| # | Example | Capability |
|---|---|---|
| 02 | tool_agent | Tool calling |
| 03 | multi_model | Anthropic ↔ OpenAI swap |
| 04 | memory_agent | Memory basics |
| 05 | workflow | Multi-step workflows |
| 06 | guardrails | Safety filters |
| 07 | mcp_tools | MCP integration |
| 08 | directives | Directive library |
| 13 | model_routing | Routing rules |
| 18 | local_llm_routing | Ollama / LM Studio |
| 27 | app_factory | App-factory pattern |
Integrations
| # | Example | Tool |
|---|---|---|
| 09 | proxy_claude_code | Claude Code CLI |
| 10 | proxy_cursor | Cursor IDE |
| 11 | proxy_codex | OpenAI Codex |
| 14 | register_agent | Registry — publish |
| 15 | discover_agents | Registry — consume |
| 23 | harness_proxy | Harness proxy primitives |
| 24 | harness_agent | Harness agent integration |
Production patterns
| # | Example | Problem solved |
|---|---|---|
| 12 | budget_enforcement | Per-user/team/project budget caps |
| 16 | agent_governance | Approval flows + audit |
| 19 | domain_model | Domain-modelled agent state |
| 20 | fleet_workers | Distributed worker registration |
| 21 | full_stack | End-to-end SDK + workflow + fleet |
| 22 | memory_holds_across_llms | Memory portability across LLMs |
| 25 | training_data_pipeline | Curator-style data capture |
| 26 | fleet_scoped_dispatch | Capability-based dispatch |
| 28 | autopilot_quickstart | Autopilot without an LLM key |
| 29 | memory_strategies | Strategy-based memory extraction |
| 31 | grounded_multi_model | Multi-LLM grounded retrieval |
| 32 | global_shared_memory | Cross-agent shared knowledge |
| 35 | autopilot_hosted_service | Autopilot via hosted blueprint service |
End-to-end walkthroughs
Each example below ships with a sibling README and maps to a tutorials page.
Notes
- Example 17 —
unsloth_finetune(legacy stub): superseded by Example 38 (real fine-tune). Marked deprecated in its docstring; left in place for backward compatibility. - No example numbered
02-08in the_factory,_perf_*,_soaks, ornotebookssubdirectories — those are dev tools, not user-facing examples. - Numbering gaps and sibling-suffixes (e.g.
38a) follow the example-build-conventions — when two PRs collide on a number, the later one gets a lowercase-letter sibling suffix to preserve numeric reservations.
What to read next
- Tutorials — production-grade examples organised by intent.
- Learn the SDK — SDK basics organised by capability.
- Production patterns — examples organised by use case.
- Integrations — integration examples organised by tool.