Repository status
Code complete · 18/18 tests passing · Published on GitHub. Everything below is the real repository, verbatim — not a summary, not pseudocode. No network, no API keys; stdlib + pytest only. Clone it, run the failure drills, steal the patterns.
File tree
The parts that matter
1 · The approval gate: nothing sends without a human
approval.py. The machine does the reading, routing, and drafting; a human decides what goes out under the business's name. The hard rule is enforced in code, not documentation: the pipeline reaches the sender only through an approved decision.
Reject at the gate and the run halts — the outbox stays empty and the log records the rejection. test_reject_halts_and_sends_nothing asserts it.
2 · Idempotent sends: retries never double-deliver
sender.py. Every send carries an idempotency key. A retried or re-run pipeline with the same key returns the original receipt and delivers nothing twice.
Failure drills are injected, not hoped for: fail_once (flaky provider — retry then succeed), fail_always (outage — escalate, send nothing).
3 · Typed handoffs: no free-form dicts cross agent boundaries
types.py. Each agent receives a dataclass and returns a dataclass. If a field matters, it is named here.
Get the full repo
Run it yourself: pip install -r requirements.txt && pytest — 18 tests, all passing. Try the failure drills first.
Go deeper: the interactive demo — run the workflow yourself, including the 2am failure scenario — and the article on what makes a workflow hold up at 2am.
Want this running your business?
Same shape, your systems, your voice — scoped, priced, and monitored before you commit. Fixed scope, fixed price, 14-day defect window.