Stage 2: how many steps, tools, and agents coordinate.
Ten tested patterns for reliable agent-graph orchestration — routing, fan-out/fan-in, orchestrator-worker, checkpointing, human approval, and more. Plain Python. Zero dependencies. No API key. No frameworks — no LangGraph, no DSL to learn.
Part of the Loop Engineering series’ Graph arc (episodes 18-27). One-time purchase — yours forever after checkout.
Watch free. Run instantly. Own forever.
Watch
The Graph arc (episodes 18-27) of the daily Loop Engineering series on the AIS YouTube channel walks the reasoning behind each pattern, free.
Run
Unzip the library and run any pattern instantly: pure Python 3.10+, zero dependencies, no API key, no frameworks. A deterministic mock model is included; every pattern ships with its test.
Own
Plug your real LLM client into one file, copy the pattern folders into your project, and keep them forever.
Which file do I run?
Each gpNN-* folder is independent — no shared install step, no config. Two files
per folder, always the same shape.
- · The pattern file (e.g.
linear_pipeline.py) is the demo — run it directly and it walks the happy path plus the failure modes the pattern exists to prevent, printed to your terminal. - · The test file (
test_linear_pipeline.py) is the proof — it exercises the pattern’s claim directly: the exact failure the pattern claims to prevent, forced and shown caught.
Read the demo first to see the pattern behave. Read the test second to see the claim hold under adversarial conditions. Copy the folder into your own project and adapt the node bodies — the runner logic and the failure handling are the part worth keeping.
What’s in the library
Ten patterns — the structural fixes that keep multi-step, multi-agent systems from rotting in production: state contracts, routing tiers, fan-out deadlines, bounded delegation, scoped handoffs, checkpointing, approval gates, fault tolerance, idempotency, and observability.
No LangGraph, no framework, no DSL to learn — every pattern is a runnable file you can read top to bottom in one sitting.
# no install, no dependencies, no API key cd gp01-linear-pipeline python linear_pipeline.py # watch the pattern run python test_linear_pipeline.py # prove it holds under failure # then plug YOUR model into one file (core/model.py) # and copy the folder into your project
Linear pipeline
Typed state flows through a fixed node sequence, with reads and writes declared and enforced at every hop.
gp01-linear-pipeline/
Conditional routing
A three-tier router — rule, then model, then human fallback — with every decision logged.
gp02-conditional-routing/
Fan-out / fan-in
Concurrent fan-out under one shared deadline, merged by a named reducer.
gp03-fanout-fanin/
Orchestrator-worker
Bounded delegation with an answered-question ledger and gap-only follow-ups.
gp04-orchestrator-worker/
Supervisor handoffs
The supervisor owns state and the final answer; specialists get only their declared needs, one level deep.
gp05-supervisor-handoffs/
State checkpointing
Versioned state checkpointed to disk after every node, with producer attribution and schema migration.
gp06-state-checkpointing/
Approval gate
The graph pauses before a sensitive node — approve resumes, deny reroutes to revise, silence expires the ticket.
gp07-approval-gate/
Fault tolerance
Per-node retry policy, failure edges, circuit breakers, and a dead-letter queue.
gp08-fault-tolerance/
Idempotency
An operation ledger records intent before every side effect and the result after, so retries never repeat work.
gp09-idempotency/
Observability
A flight-recorder trace of every node hop — timing, input/output digests, routing reason, cost.
gp10-observability/
Where it sits
Free demos & tutorials
- · Happy-path only — no failure edges
- · No tests, no dead-letter handling
- · Break the moment a worker hangs or a node crashes
Graph Engineering Code Library
$79 · one-time- · Ten structural patterns, implemented + tested
- · Runs offline — no API key, no dependencies
- · Plain Python — no LangGraph, no DSL to learn
- · Model-agnostic: works with any LLM
Graph frameworks (LangGraph, etc.)
- · Heavy abstractions you don’t control
- · Framework churn every quarter
- · The failure-handling is still on you underneath
Get the library
$79 · one-time, no subscription
- ✓ All ten agent-graph patterns, implemented + tested
- ✓ Pure Python 3.10+ · zero dependencies · no API key
- ✓ No frameworks — no LangGraph, no DSL to learn
- ✓ Mock model included — swap in your real client in one file
- ✓ Email support at [email protected]
Want the whole stack?
The Complete Stack bundles Loop, Graph, and Hardening — every pattern across all three libraries — in one download, for $199.
Buy the Complete Stack — $199 →