AI Agent Reliability

Deterministic AI Workflows: Fix the Path, Bound the Judgment

For process owners who need the same case to take the same route, while retaining AI only for the small part of the job that genuinely needs interpretation.

Uli PrantzBuilds and operates all-agents
Published
Key takeaways

Key takeaways

  • A deterministic workflow has explicit states, allowed transitions and finish conditions; identical validated inputs take the same code path.
  • AI can sit inside a deterministic workflow when its output is constrained to a schema, checked against rules and unable to choose its own permissions or destination.
  • Move a step from model judgment to code once accepted examples reveal a stable rule. Keeping settled logic in a prompt buys variance without adding value.
  • Determinism ends at an external boundary unless you verify the destination state. A successful API response alone is not proof that the business effect is correct.
A deterministic AI workflow uses fixed code to control sequence, state, permissions, validation and side effects. A model may interpret an unstructured input or make one bounded judgment, but it cannot invent the route or expand its authority. The same validated case therefore takes the same permitted path, and every variable output is checked before the workflow can act on it.

Determinism is a contract for the path

Calling a workflow deterministic does not mean every byte of its output must be identical. Timestamps, generated identifiers and a bounded summary can vary. The contract is narrower and more useful: the workflow has declared states, each state has allowed transitions, inputs are validated, authority is fixed before the run and every terminal state has a testable condition.

The model can propose a value inside that contract. Code decides whether the value is well formed, permitted and sufficiently supported. A model that chooses its own tools, repeats until it feels finished and writes to any destination it discovers is an agentic runtime, even if its prompt contains a numbered list.

The boundary between fixed workflow control and bounded model judgment.
ConcernDeterministic ownerModel may do
Trigger and identityValidate event type, business key and versionNothing
InterpretationProvide allowed labels and evidence requirementsClassify, extract or summarize within the schema
RouteSelect the next state from explicit rulesReturn evidence used by a rule
AuthorityGrant tools, fields, scope and expiryChoose only among pre-authorized options
External effectUse an idempotency key, approval state and destination checkDraft the proposed payload
FinishAssert the post-condition or enter a named exception stateExplain an exception for review

Convert settled judgment with a rule ledger

The useful conversion unit is one decision, not a whole workflow. Review accepted runs and find decisions whose explanation now repeats. If a process owner can state the condition, output and exception without “usually” or “use judgment,” the decision is ready to leave the prompt.

Google SRE describes automation as consistent and quick, while warning that automation applies a mistake just as faithfully as a correct rule. Its account of the evolution of automation is why the ledger includes both a rule and a proof obligation.

Record enough information to move one repeated decision into code.
FieldQuestion
Business keyWhich real-world item makes two attempts the same work?
RuleWhat exact condition selects the output?
Source fieldsWhich validated values may the rule read?
OutputWhich typed value or state transition may it produce?
CounterexampleWhich accepted case would make this rule wrong?
ExceptionWhere does missing, conflicting or novel input go?
Post-conditionWhat destination fact proves completion?

Run the old and new decisions against the same case set before switching traffic. Google's testing guidance treats passing tests before and after a change as evidence that specific behavior stayed equivalent. Preserve disagreements; they show either a missing branch or judgment that should remain variable.

A support triage workflow with one variable step

Simulated account-access requestSimulated example data

An email arrives with ticket key SUP-4182. Code validates the channel, tenant and required fields, strips unsupported attachments and creates a run keyed by the ticket. A model selects one of six approved intent labels and returns the sentence that supports it.

Code checks the label, confirms the cited sentence exists and applies the routing table. “Account access” plus an identity mismatch always enters needs_identity_review; the model cannot route around that gate. A human either confirms the identity evidence or rejects the request. The write uses ticket:SUP-4182:route:v1 as its effect key, then reads the assigned owner back from the support system.

The model can vary its explanation. It cannot vary the allowed label set, identity rule, approval requirement, destination or number of writes. A second delivery of the email reaches the same completed effect rather than creating a second assignment.

Release only when the fixed path is observable

  • Version the contract: instructions, model, schemas, routing rules and tool permissions belong to one release identity.
  • Test the boundaries: malformed input, missing evidence, model refusal, tool timeout, duplicate delivery and denied approval each need an expected state.
  • Record transitions: keep the state entered, rule or evidence used, actor, time and effect key.
  • Reconcile effects: read the destination and compare it with the authorized proposal before marking the run complete.
  • Canary narrowly: start with a reversible input class and a stop rule, then expand only after observed cases pass.

Use AI agent evaluation for the case set and slice gates. The deterministic path reduces what must be judged; it does not remove the need to test the boundary around the judgment that remains.

Limitations and when not to use this

  • A deterministic route can still encode the wrong business rule. It improves repeatability and diagnosis, not the validity of the policy itself.
  • External systems can accept a request and settle into a different state later. Reconciliation and repair remain necessary at every side-effect boundary.
  • Do not force genuinely ambiguous, consequential decisions into code merely to claim determinism. Keep a qualified human decision where the rule cannot be stated and tested.

Sources

  1. The Evolution of Automation at GoogleGoogle, Site Reliability Engineering Accessed 4 August 2026
  2. Testing for ReliabilityGoogle, Site Reliability Engineering Accessed 4 August 2026
  3. Evaluation best practicesOpenAI Accessed 4 August 2026

Classify one disputed step

Answer the visible decision rules and export the minimum execution and control contract.

Classify one disputed step
About the author

Uli Prantz

Builds and operates all-agents

Uli Prantz builds all-agents, the process-automation platform this site documents. He writes about the operational side of automating recurring business work: where deterministic code beats model judgment, where it does not, and where a human still has to approve.

Bring one process. We will scope it in 30 minutes.

You leave the call knowing whether it is a fit, what can become code and what still needs a person.

Book a discovery call