3 min read
How to design recovery for long-running AI workflows
A long-running AI workflow can fail after a downstream system has already committed. Recovery has to be designed, not left to another model call.
3 min read
An agent framework is a useful way to describe a loop: interpret a request, choose a tool, read a result, decide the next step. That loop is not the system an enterprise can operate.
Once the work can last longer than a single request, touch more than one system, or change a record that other people rely on, you need a runtime. The runtime is the software that still exists after the model has finished talking.
A framework can help you:
Those are real problems. They are not identity, authorization, durable state, or recovery.
A runtime sits between the agent and the systems the business already runs. It should own at least these concerns.
Identity and delegation. Who started the work, which agent is acting, and what authority was handed on. A language model should not be the only place that question is answered.
Workflow state. Long-running work needs a record of where it stopped, which steps completed, and which are still open. A chat transcript is a poor substitute for that record.
Execution limits. Timeouts, retry budgets, rate limits, and a ceiling on how many tools can run for one request. Unbounded loops are an operational incident, not a feature.
Authorization before the API. The runtime evaluates the attempted action against policy, then calls an approved adapter. The model can recommend. It should not be the last control.
Recovery. When a call times out, the downstream system may already have committed. The runtime needs a way to reconcile, retry with an idempotency key, or stop without inventing a second write.
Evidence. Operators need a correlation id that connects the original request, the policy decision, the tool call, and the business result.
If you treat the framework as the architecture, every improvement to the model quietly changes the security boundary. A new tool, a longer timeout, or a more aggressive planner can start work the rest of the platform cannot see.
If you treat the runtime as the architecture, you can change models, prompts, and planners without redrawing who is allowed to do what. Evaluation, observability, and incident response all attach to the same execution record.
Ask whether you can answer these questions without reading a prompt:
If the answers live only in the agent loop, you have a framework. You do not yet have a runtime.
Use an agent framework to plan and to call tools. Use a runtime to authorize, bound, recover, and record those calls. Enterprise AI fails in production when those two jobs are treated as the same job.
3 min read
A long-running AI workflow can fail after a downstream system has already committed. Recovery has to be designed, not left to another model call.
3 min read
What changes when a language model has to work with trusted data, permissions, existing applications, and a record of what happened.
3 min read
How to let an agent do useful work while the platform, not the model, owns authorization, state, and the evidence of what ran.