Durable execution and AI agents
The problem
In-memory orchestration evaporates on deploy. Multi-hour reviews need durable state.
Retries without idempotency double-charge or double-file.
What to require
Persisted workflow state, exactly-once or safely-at-least-once tool semantics where it matters, and replayable history.
Framework choice is secondary to these properties. Evaluate durability before DX polish.
Human waits
A case can wait hours for an underwriter. The runtime must resume without redoing paid side effects.
Design steps as "complete / waiting / failed" with clear resumable points.
Deploys during flight
Rolling deploys should not orphan in-flight cases. Persist version of rules used at start of case, or define migration rules for open work.
In practice
Map the workflow on a whiteboard before you open a framework: inputs, systems of record, humans, and irreversible writes. If that map is fuzzy, the agent will encode the fuzz.
Pick ten to fifty real historical cases as an eval set. Include the ugly ones. Run the agent offline against them until critical fields and hard rules are acceptable. Only then connect write tools.
Ship with a pause switch, a human queue, and a weekly review of override reasons. Promote repeated overrides into rules. That loop is how production systems improve—not another prompt brainstorm.
Common failure modes
- Treating a demo on clean samples as readiness for production volume.
- One shared service account with broad write access across systems.
- No owner for the exception queue, so failures pile up as noise.
- Changing prompts and models without regression gates on real cases.
- Measuring only model latency or thumbs-up, not completed-case cost and audit completeness.
What good looks like after ninety days
The first workflow is boring: stable override rate, known failure modes, operators who trust the queue. Config changes go through review. Traces answer "what happened to this case?" without archaeology.
At that point you can add a second document type or a second agent role. Expanding before the first path is boring is how programs stall with five half-built pilots.
AI agent systems·Vercel eve and agent shape
Frequently Asked Questions
Is a queue enough?
A queue helps. You still need a case model and step status, not only jobs on a bus.
How does Senrok handle long waits?
Human checkpoints and external systems are first-class steps with durable case state—not chat sessions.