Recipes: closed real-world cases¶
A recipe is a real business case from start to finish — not a feature demo. Each one follows the same template so you can compare cases and lift the structure for your own:
- The business problem — what the system is for, who uses it.
- Graph design — the topology (and why it is shaped this way).
- State schema — what flows between nodes.
- Durability & HITL — why this case needs checkpoints / interrupts.
- Testing strategy — how it is verified offline, no LLM.
- Cost & observability — what to watch, what it costs.
- Deploy — how it runs in production.
- How to adapt — the knobs you turn for a different business.
Each recipe points at a runnable example in examples/ so you are never
reading abstract code.
| Recipe | Business case | Runnable example | Core pattern |
|---|---|---|---|
| FastAPI agent in 10 minutes | Durable AI agent over HTTP | fastapi_server + teff/scaffold/fastapi |
Flow.react() + checkpointer + SSE streaming — the zero-to-30s on-ramp |
| Fraud review | Payment screening | fraud_gate |
Dynamic Command routing + HITL + durable resume |
| Release approval | Ship-gate with human sign-off | release_coordinator |
Supervisor + route() + Map + approval gate |
| Support triage | Customer-support SLA hub | simple_router + repair-ai-chat |
route() supervisor + RAG + HITL escalation |
| Ops daemon | Scheduled change-triage | repo-health |
YAML-only agent-driven tick via CLI daemon |
| KB assistant | Grounded self-service Q&A | rag_search + repair-ai-chat |
RAG retrieval + confidence gate + human fallback |
| Invoice processing | AP automation with approval | structured_output + agent_approval |
Extract/Fallback + Validate + durable approval |
Reading the pattern¶
The six cases differ in business, but the graph anatomy repeats:
- One entry point — a node that builds context (ingest / reset / context builder).
- A driver — either an agent loop (
react_agent,ReActAgent) or a supervisor (route()/Supervisor) that decides what happens next. - A fan-out —
Parallel(fixed branches) orMap(runtime list). - A human gate —
Interrupt/Askwhere a wrong answer is costly. - A finalizer — a node that commits, sends, or writes the outcome.
If your case is a mix, combine the recipes — e.g. a support hub that also re-triages nightly (triage + ops daemon) or a release gate with a fraud check (approval + fraud).