Templates¶
Production-ready, end-to-end examples shipped with the SDK. Each template lives under examples/ and includes its own README, eval suite, and tests.
| Template | Pattern | What it shows |
|---|---|---|
| Deep Research Agent | Scope → parallel Research → Write | Long-horizon research with structured trace spans, real web search/fetch, parallel sub-researchers via asyncio.gather. Pairs with the trace-learning loop for self-improving agents. |
| Regression from Trace | capture → analyze → fix → save → verify | The full trace → replay → fix → regression-test loop. Five small scripts demonstrating fork_at, with_tool_override, and save_as_test against a deliberately broken tool. |
| AutoLLM Closed Loop | registry → traces → dataset → eval → optimize → version → gate → alias | A live triage agent's traffic becomes a labelled dataset; AutoLLM writes the next prompt; it becomes a registry version, passes a pytest gate, and ships by moving one alias. Every step on a Local UI page. |
| Calibrate Your LLM Judge | reviewer labels → judge as an agent → AutoLLM → LLMJudge → selection + audit judges | A "good customer service?" judge passes a reply that promises a refund. Calibrated on the reviewers' labels it agrees with them on unseen replies, then selects a support agent's prompt while a different judge audits. |
| Customer Support Agent | Single Agent + HITL | Multi-turn support with checkpointer, memory, tool budget, KB retrieval, eval suite. |
| Research Agent | Supervisor + 3 workers | Researcher → Writer → Verifier with revision loop and citation auditing. |
| Sales SDR Agent | Multi-step workflow | Lead qualification chain with structured outputs. |
| Meeting Notes Agent | Structured output | Transcript → schema-validated meeting notes. |
| Personal Assistant | Long-context memory | Multi-tool orchestration with composable memory blocks. |
Templates are meant to be read, copied, and adapted — not used as black-box dependencies. Each one stays under ~500 lines so a developer can hold it in their head.