Blog
Saved0

What an AI execution runtime does that a workflow engine doesn't

The claim waited 36 hours, resumed on new rules and was paid twice. What a runtime for AI work must keep true across time, failure and human delay, beyond putting steps in order.

LinkedIn
On this page
  1. The claim waited 36 hours. The rules didn't.
  2. Isn't "workflow" enough?
  3. What is an AI execution runtime?
  4. Four things that share one name
  5. Steps are capability boundaries
  6. Connections carry data, authority and conditions
  7. Can typed contracts make model output safe?
  8. State has to survive time, failure and people
  9. Retries aren't side-effect rules
  10. Publishing is an architectural boundary
  11. What stays outside the runtime
  12. Common anti-patterns
  13. Ten rules for a governed AI runtime
  14. The result: a runtime that can prove what it did
  15. Frequently asked questions
  16. How Frozion runs AI work durably
  17. Sources
The short answer

An AI execution runtime runs one published, versioned workflow and keeps it true across time and failure. It carries who is acting at every step, checks typed boundaries around model output, binds approvals to the exact proposal, treats external writes by their effect class, and keeps each paused case on the version it started under, with evidence for every transition.

The claim waited 36 hours. The rules didn't.

An insurer uses AI to propose property claim settlements. A claim arrives, policy and loss data are pulled, a model recommends a figure, rules calculate limits, and an adjuster approves a payment. The workflow then waits for the payment service.

One claim sits paused for 36 hours. In that time the prompt template changes, the model route is updated, a policy threshold moves and a payment mapping is republished. When the case resumes, the screen still shows an approval, but the runtime picks up the latest definitions. The proposal that was approved and the one that executes are no longer provably the same.

The bank accepts the payment, but the connection drops before the response arrives. The workflow retries. With no stable operation ID, the bank accepts the second request too. The model answered, the approval was recorded, the retry returned success. The claim was paid twice.

This isn't a bad prompt, a model error or an outage. It's a runtime that didn't keep one version from proposal to payment, didn't treat approval as durable state over a fixed proposal, and didn't classify the payment before retrying it.

Isn't "workflow" enough?

Not as a label. "Workflow" covers everything from a four-step automation to an agent loop, and it doesn't tell you whether identity, policy, approvals, versions and side effects are actually enforced.

Workflow technology isn't primitive. Process standards such as BPMN and decades of workflow research cover branching, parallelism, exceptions, timers, human tasks, events, compensation and long-running state. Durable workflow engines survive crashes, infrastructure failures and long human delays.

The problem is that saying an application "has a workflow" tells you nothing about whether model output is typed, whether identity survives each hop, whether policy can stop an action, whether approvals are tied to a fixed proposal, whether replay can avoid live side effects, or which version a paused case resumes on. Those answers may exist, spread across code, gateways, policy engines, queues, prompt stores and audit tables. The label doesn't promise they're held in one place.

That's the gap AI widens. When a step decides its own path at runtime, the order of steps tells you less, and the guarantees around each step tell you more.

What is an AI execution runtime?

It's the system that runs one published, versioned workflow and keeps its guarantees across time and failure: authority, policy, typed boundaries, approvals, side-effect rules and evidence, from the first step to a confirmed result.

The visual workflow, the stored definition, any compiled form and the run evidence can all look different. They must all resolve to the same versioned meaning. If the diagram changes and the running logic doesn't, the diagram is documentation. If generated code can't be traced back to the workflow, the workflow is a sketch.

A published workflow version holds, directly or by fixed reference: typed steps and their contracts; connections with declared data, control, error and compensation behavior; mappings and defaults; identity, tenant and policy requirements; wait, timeout and approval behavior; side-effect classes and retry rules; pinned versions of prompts, model routes, API specs, policies and sub-workflows; and the evidence each consequential step must leave.

Four things that share one name

Many lifecycle bugs start when teams call four different things "the workflow."

ArtifactWhat it isCan it change?What it may do
DraftThe editable workspace with tests and experimentsYesNothing in production
Published versionA validated release with pinned dependenciesNoStart new cases
RunOne case of a published version with real inputs, people and stateOnly by moving forwardMake governed changes in the world
ReplayA reconstruction or simulation of a past runNo effect on the originalInspect and test, never repeat committed effects by default
Draft, published version, run and replay shown as four boxes with arrows and their mutability and side-effect rules
One workflow, four identities. Mixing them up is where version drift starts.

Replay and retry are different operations with different authority. A retry tries to finish the same action. A replay looks back and should never pay anyone.

Steps are capability boundaries

A step is more than a function name. The same box on a canvas might be a calculation, a query, a document search, a model call, a policy decision, an API write, a human task, an event wait or a sub-workflow. Each needs different checks and leaves different evidence.

Step typeContract to declareWhat the runtime watchesWhat to record
CalculationTyped input and output, mapping, errorsTimeout, compatibilityInput and output digest, code version
Query or searchParameters, result shape, scope, freshnessPermission and tenant filtersQuery, source version, result references
Model callContext shape, model route, output schemaValidation, policy, costPrompt and model versions, context sources, output
Policy checkFacts in, decision out, conditionsFail closed, conflictsPolicy version, decision, enforcement
External writeAPI contract and effect classCredentials, operation ID, retry, reversalValidated arguments, request ID, confirmed result
Human approvalFixed proposal and decision shapeExpiry, authority, resume rulesApprover, proposal version, decision
Event or timer waitCorrelation key, event shape, deadlineDuplicates, late events, safe resumeEvent ID, time, resulting transition

The runtime doesn't need to know how each capability works inside. It does need to know enough about the boundary to validate the request, enforce policy, schedule the work, classify failure, keep state and attach evidence.

Reusable sub-workflows follow the same rule: they're versioned capabilities with a declared boundary, not boxes copied between canvases. If a new sub-workflow version adds data access, a different model provider, a broader credential or an irreversible write, that changes what the parent must govern. And a published parent should pin the exact sub-workflow version. "Latest" is fine in a draft and indefensible in a paused case.

Connections carry data, authority and conditions

A line between a model and a payment API shouldn't mean "send whatever the last step returned." It should mean: validate this proposed action against this schema, derive these fields through these mappings, keep these classifications, check these policy facts, require this approval, call this versioned API under these side-effect rules, and record this evidence. JSON Schema, OpenAPI, AsyncAPI and CloudEvents give you mature building blocks for each part.

Authority crosses the line with the data. The runtime doesn't need to forward one broad user token everywhere. It can use narrower, audience-bound credentials and delegation records while keeping a verifiable chain back to the person whose authority is being used, for what purpose, over which resource. (See AI agent identity and delegated authority.)

Policy attaches to both steps and connections. A policy step decides whether a settlement is allowed. A rule on a connection decides whether certain fields may reach an external model. The policy engine can stay a separate system. The workflow defines where the decision belongs, which facts it gets and how its result changes what happens next.

Can typed contracts make model output safe?

They make it checkable, not correct. A schema-valid payload can still be wrong or unauthorized, but typed boundaries let the runtime tell invalid structure from denied policy, missing evidence or an expired approval.

Putting a model inside a workflow doesn't make it deterministic. The point is to put deterministic checks around probabilistic output. Before a model's recommendation becomes trusted state or reaches an API, the runtime requires structural validation, semantic checks, policy, thresholds and, where the rules say so, a person.

Without those distinctions, every defect collapses into "the AI failed." With them, you know which boundary stopped the work and why. Contract changes matter too: if a sub-workflow still emits version 2 of a claim object while the next step expects version 3, publishing should catch it, not production.

State has to survive time, failure and people

Enterprise work rarely finishes in one call. It waits for documents, callbacks, approvals, fraud reviews and customers. The runtime has to keep state without holding a thread open or relying on a process that stays alive.

A paused case should keep its published version, its current step and state, pending correlation keys, identity and policy context, the proposal awaiting approval and its evidence, deadlines and the transitions allowed on resume. Keep business state (claim status, approved amount) separate from runtime state (pending event, attempt count, committed effect), so the runtime can check that an incoming event matches the expected case and transition instead of waking up because a familiar ID arrived.

Retries aren't side-effect rules

A remote system can commit while the response is lost. A worker can crash after a write but before recording it. An event can arrive twice. Retrying everything isn't resilience; for writes that can't be safely repeated, it's duplication. HTTP itself warns against automatically retrying non-idempotent requests without knowing they're safe.

So classify each external effect: no external change; read-only; safe to repeat; protected by a stable operation ID; reversible by a defined counter-action; or irreversible and manual. The class decides retries, replay, approvals, timeouts and escalation. A refund doesn't erase a payment; it's a new governed action. And "exactly once" across arbitrary systems is a promise few can keep. What you can keep is explicit behavior under uncertainty: stable IDs, reconciliation before retry, and a person when no safe automation exists. (See retries and idempotency.)

Publishing is an architectural boundary

Long-running cases expose a version problem short requests can ignore. Publishing should freeze or pin everything needed to reproduce a run: steps, contracts, mappings, prompts, model routes, policies, sub-workflows, retry and timeout rules, effect classes and evidence requirements.

A running case stays on its published version unless someone migrates it, and a migration is a governed operation with its own compatibility checks, policy implications, approval consequences and rollback. Silently adopting the latest definition isn't evolution. It's losing track of what ran. (See versioning AI workflows.)

Publishing can also compile the workflow into an efficient runtime plan: precompiled mappings, resolved references, scheduling metadata. The rule is that optimization never removes a policy check, an evidence requirement or an effect class, and every runtime event still maps back to a step people can read.

A lifecycle loop from design through publish, run, pause, resume, complete, inspect, replay and retire
Design, publishing, running, inspection and retirement are one lifecycle.

What stays outside the runtime

The runtime doesn't absorb everything. Algorithms, connectors, specialized models, policy engines, databases, message brokers, identity providers and enterprise systems stay independently engineered. The workflow references them through contracts and versions. It doesn't reimplement the policy engine; it says where the decision belongs, feeds it the facts, enforces the result and records it. Lineage tools keep their job and run records; the workflow connects them to decisions, approvals and effects. The workflow owns what the behavior means. Components own how they do their part.

Common anti-patterns

Anti-patternWhy it failsWhat to do instead
Paused cases resume on the latest definitionThe approved proposal and the executed one differKeep each case on its published version; migrate on purpose
Approval stored as a message or checkboxIt can't prove what was approvedBind approval to a fixed proposal and its versions
Retrying every timeoutSome failures happen after the effectClassify effects; reconcile before retrying
Sub-workflows referenced as "latest"Nested behavior changes under a running casePin exact versions at publish
Treating schema-valid as correctValid structure can still be wrong or unauthorizedAdd semantic checks, policy and review
Replay calls live systemsInvestigation repeats production effectsReplay as inspection or simulation
Compiler strips checks for speedPolicy and evidence vanish from the running formOptimize only work that carries no governance meaning

Ten rules for a governed AI runtime

  1. Run the same versioned definition people reviewed.
  2. Keep draft, published version, run and replay separate.
  3. Declare a contract for every step, including model calls.
  4. Carry identity and purpose across every connection.
  5. Put policy where the decision belongs, and record that it was enforced.
  6. Bind approvals to a fixed proposal.
  7. Keep paused cases on the version that started them.
  8. Classify each external effect before deciding how to retry.
  9. Pin sub-workflow versions at publish.
  10. Never let replay repeat a committed effect.

The result: a runtime that can prove what it did

The difference between a workflow and a governed runtime isn't the number of steps, the presence of a model or a visual builder. It's whether there's one authoritative, versioned definition whose guarantees hold across time and system boundaries. A mature workflow engine supplies much of the foundation. Agent frameworks coordinate models and tools. Policy, identity, lineage and observability tools each do their part.

The runtime ties them together so you can answer, for any case: which definition ran, what crossed each step, whose authority was used, which policy could have stopped it, what was approved, what happened on timeout, which effects committed and what evidence remains. If the runtime can't prove those, it's orchestration, not governance.


Frequently asked questions

Isn't a durable workflow engine already an AI runtime?

It provides much of the foundation: persisted progress, timers, events and recovery. An AI runtime adds identity carried through every step, policy at each boundary, typed checks on model output, approvals bound to exact proposals, effect classes for writes and evidence tied to the version that ran.

What happens to a paused case when the workflow changes?

It stays on the version that started it. Moving it to a new version is a deliberate migration with its own checks, and an approval given under the old version doesn't silently carry over to a changed proposal.

Can a schema make model output safe?

A schema makes output structurally valid, not correct or authorized. It turns vague failures into named ones: invalid structure, denied policy, missing evidence, expired approval. Semantic checks, policy and human review still do the rest.

How does this work for agents we already run?

Route the agent's tool calls through a governed runtime over MCP or HTTPS. Each call is then checked against policy and identity, paused for approval when rules require it, carried durably through to a confirmed result and recorded against the workflow version.

With Frozion

How Frozion runs AI work durably

Durable Execution survives a crash or restart of Frozion itself, deploys don't interrupt running cases, and every wait has a timer, deadline and fallback. An API timeout is an unresolved outcome, and uncertain writes are reconciled before any retry. Policy is enforced before and after every step, and authority is rechecked when paused work resumes, right before the change. The HITL Inbox binds approval to the exact revision reviewed. Version compare, batch simulation on recorded cases, approval to publish and rollback keep change governed, and Behavior Intelligence & Replay inspects past cases without live side effects.


Sources

  1. OMG, Business Process Model and Notation (BPMN) 2.0.2Workflow notation with precise process semantics.
  2. RFC 9110, HTTP Semantics, §9.2.2 Idempotent MethodsDon't automatically retry non-idempotent requests without knowing they're safe.
  3. JSON SchemaMachine-validated structure for step inputs and outputs.
  4. OpenAPI SpecificationLanguage-neutral HTTP interface contracts.
  5. AsyncAPIContracts for message-driven interfaces.
  6. CloudEventsCommon event metadata, including IDs for de-duplication.
  7. Open Policy Agent documentationSeparates policy decisions from enforcement.
  8. OpenLineageDistinguishes job definitions from uniquely identified runs.
More in Platform architecture

Platform architecture

Why a governed runtime 4
Building AI applications 4
Semantic integration 1

Other topics

Pick up where you left off: