---
title: "Why Workato wraps agents in deterministic workflows"
description: "Chris Miller of Workato on model routing, token cost accounting, MCP tools built around intent, and scoping a shared connection down per agent workflow."
url: https://workos.com/blog/workato-deterministic-workflows-for-agents
published: "Dec 02, 2026"
---

# Why Workato wraps agents in deterministic workflows

At AWS re:Invent 2026 in Las Vegas, Greg Sabo from WorkOS sat down with Chris Miller, a staff developer advocate at Workato who started out as a software engineer and now builds the company's demos and workshops. The conversation kept returning to one question: once an agent is pointed at a real business process, what has to sit around it so the result comes out the same way twice?

[Embedded media](https://www.youtube.com/embed/Uzv3UgALZh8)

Miller's answer is that the agent should be doing less than you think. The reasoning model picks the intent; a deterministic workflow does the work.

*A routing layer sits between the client and the model providers, so changing which model answers a request is a policy edit rather than a deploy.*

## The age of cost optimization

A couple of months before re:Invent, Workato shipped a suite of tools around an AI control plane: an execution and control plane in front of agents that covers observing what they do, controlling what they do, cost accounting, and decision-based routing.

Routing is the part most teams feel first. Miller's example is the engineer who favors a particular model because they think it will do better, on a model expensive enough that there may be no business justification for it. The control plane can override which model serves a given task based on the complexity of that task or on other rules, so a simple decision that writes no code can be sent to something like Haiku instead. Teams start with a default rule that passes everything through, then make incremental adjustments that never touch the code the agent runs on. Miller describes that as a two-way door: if a rule produces less consistent output, you change the rule back.

The mechanism is deliberately boring. Workato accepts the OpenAI request format and lets you configure the providers behind it: Anthropic, Bedrock, Fireworks, OpenAI, with more being added. The steering is agnostic to whatever client is making the request.

Why bother? Miller's framing:

We are in the age of cost optimization. Because not only are we trying to prove the ROI on the spend itself, but we're also questioning how the spend is occurring. Did we really need to spend that many tokens to accomplish a task? Or what task did we actually spend the tokens on?

That last question is the hard one. Model providers report spend per user or per API, which tells you nothing about what the workload was. Workato tags requests and cost-accounts against the tag, so a team can track every token spent across a project and break it down by model. Sabo pointed out where that lands organizationally: engineering leaders already have to account for how much bandwidth goes to new development versus maintenance, often as a compliance ask, and tagged spend produces a precise figure per pull request or per feature of a kind nobody has managed to produce for people's time.

## One tool for the whole intent

Workato has been running deterministic workflows for 13 years, which made putting a cloud-hosted secure MCP server in front of any workflow in the product a short walk.

A generic MCP server and an intent-shaped one look alike until something goes wrong. Put a generic one in front of, say, Gmail and it exposes the individual API endpoints as tools, which leaves the agent responsible for understanding the whole service: the order of operations, which parameters to set, how the pieces compose. Then you ask it to do that identically every time:

And you're expecting it to do that deterministically each time and it won't, right? Because if you ask an agent to do the same thing 10 times, you're going to get some various outputs, right?

Workato's approach is to start from the business problem, encode it as a deterministic workflow carrying the logging and observability enterprises expect, and expose the whole thing as a single tool representing an intent: clean up all the sales inquiries in my inbox. The workflow then runs it in one go.

## Errors that tell the agent what to do next

Workflows still fail. A transient connection error to an API endpoint gets graceful retries with exponential backoff. What happens after the retries run out is the more interesting design decision:

instead of like returning a 500 error, that means nothing and kind of makes the agent guess what the next step is, you can surface contextually relevant messages back to the agent that tell it what the next step is to do. So that it does that instead of burning tokens going in circles.

The failure mode Miller is guarding against is the partially executed workflow: the agent has no idea what state things are in, and someone ends up cleaning up a large mess manually, assuming they find out it happened at all. Sabo described the same behavior from the other side. Agents are resourceful, and one that hits a roadblock will try whatever tools, hacks, or workarounds are at its disposal — browser use, connecting through some other route, asking a person for approval. Those workarounds are rarely how you wanted the job done.

Miller's read on why:

an important thing to consider here is like the models are biased for action, right? They're trying to be helpful. And they're really general purpose models. They're capable of doing a lot of different tasks and they're really trying to succeed. But there are times where you don't want it to try to, you know, go in YOLO mode and try to guess how to put things back together.

Feeding the right context at the right time is how you constrain that. Sometimes the right context is a human. Workato workflows have triggers, actions, and conditional logic, and can route an approval through Slack, asking permission to charge a card for the thing the agent was told to go find. The goal is getting a person involved before the mess, not after.

## Agent identity is borrowed identity

Sabo brought up where WorkOS has been spending its time: authentication for agents. WorkOS published auth.md, a protocol for making it possible for agents to sign up for services, and is building Passport, Airlock, and Agent MCP to take authorization friction out of agent development. The irritation behind that work is mundane and universal: signing in to the same services over and over to keep local agents alive, with cloud agents being worse because they want a shared account.

Miller agreed on the shape of the problem. Agent identity means handing an agent access to a human's accounts, and re-authentication goes from inconvenient to genuinely problematic when a workflow has to execute at a specific time. Workato's integration platform handles the first half by refreshing credentials: OAuth a resource on a connection, and the platform learns that token's refresh cycle and keeps it alive.

The second half is access. Some connections have to be authorized with a service account:

So that might have God-like privileges in whatever that account is, right? And you need to provision very specific permissions to restrict what the agent can get to. So we can define what those permissions are and then bake that into the tool that's exposed to the agent so that maybe it only needs a read-only access to specific endpoints, right?

Workato runs an RBAC layer in the middle for exactly this. Many workflows, MCP-enabled or not, can share the same full-privilege connection while each one's permissions are set granularly, so every workflow can take least privilege as its own default.

![One large full-privilege connection passing through a permissions gate that splits into four progressively narrower scoped tools](https://cdn.prod.website-files.com/621f84dc15b5ed16dc85a18a/6b0fb584c12adff5fc01b620_6b0f5fe974e419039a4674e6_workato-deterministic-workflows-for-agents-img-1.webp)

*One broadly privileged connection, many narrowly scoped tools: the shared credential stays put while each workflow hands the agent only the permissions that task needs.*

## RBAC has to be understandable before it can be trusted

WorkOS is working on Atlas, a platform aimed at making RBAC easy to vibe code against: a shared RBAC data model in the SDK that every app can use and that a unified IT layer can manage. Sabo's argument for why that is tractable now is scoping. Internal apps have a relatively static set of users who map cleanly to roles and resources, which allows a simpler model than the one a company like Google needs.

The hard part is not correctness:

it needs to not just be correct, it needs to be something that like an administrator or user will say like, okay, I understand these rules enough to trust a system to enforce them.

Both of them landed on the same starting position: begin at zero privilege and work up. Both had the same complaint about it. Allowlists are more accurate than blocklists, and an allowlist means poking a new hole or chasing a new approval every time someone needs to do something specific. Sabo's proposed way out is a deterministic RBAC layer that an agent grooms over time, adjusting roles based on how people actually use the tool. That is defensible because of what internal tools are: for an internal app, being shut down beats being out of date and insecure, a lifecycle tradeoff nobody would accept for software they sell. It still needs someone watching what the agent grooms the rules into, since the system that closes a stale permission is the one that can quietly widen a live one.

Stack the three layers and no single piece decides everything. Routing policy picks the model. The deterministic workflow picks the action. RBAC picks the scope. The agent gets handed a broader scope only because something underneath it narrows that scope per task. Most teams shipping agents against production systems have none of the three in place yet. Pick whichever one is currently costing you money or sleep, and build that.
