A company of AI agents that actually finishes things: board, handoffs, a gate, and a meter
Description and use
A structured workflow with a task board, dispatcher, handoff contract, and budget meter eliminates memory loss, infinite loops, and untracked costs in AI agent teams.
Problem
Organizational failures in AI agent pipelines: tasks never remember blocked status, “done” is only model stop, infinite loops, and no budget monitoring.
Outcome
The structured workflow eliminated memory loss, prevented infinite loops, enforced artifact quality, and enabled real‑time budget monitoring, allowing the team to finish tasks reliably.
Workflow
- Define task dependencies in a SQLite board and transition rules for ready/blocked/done states.
- Log every state transition in an append‑only events table for auditability.
- Create a dispatcher that routes ready tasks to role‑specific handlers in a defined order.
- Implement handlers that return structured dicts and raise on errors to block tasks.
- Apply a handoff contract per role to validate required output keys before marking a task ready.
- Escalate tasks after a configurable block limit instead of retrying.
- Track budget usage with a meter that is monitored by a human.
- Run the dispatcher in cycles until all tasks are completed or escalated.
Evidence
A board, roles with defined handoffs, a gate before anything ships, and a budget someone is actually watching.
A task becomes ready only when every parent is done
A handler that raises blocks the task (with the error in the event log) instead of killing the run.
After N blocks on the same task, stop and route it to a human.
Per role, the keys that must be present on completion.
- Record date: 2026-10-08T20:40:56.503Z