AI Strategy

Where Decision Models Fit in an AI Agent Stack

A fast decision model belongs in front of expensive LLM calls — routing, tool selection, loop-break and escalation. The two-speed agent pattern, with a reference architecture builders can copy.

By Dr. Sanju Abraham 20 min read
Editorial, product-forward hero illustration — a wide horizontal agent-stack diagram on an off-white background. LEFT: an incoming event box labelled 'event / user turn'. CENTER: a vertical turnstile-like band in emerald green labelled 'decision model' with three outgoing arrows. RIGHT: the arrows split into two parallel paths — the top path labelled 'FAST (direct action)' flowing to a 'tool call' box in navy, and the bottom path labelled 'SLOW (LLM reasoning)' flowing to a larger 'LLM' box in pale slate. A faint third path returns to the start labelled 'loop break'. Thin pale slate separators between zones. Palette strictly off-white background, pale slate grays, one emerald green accent for the decision band, one navy ink for labels. Clean, flat, geometric. Linear or Stripe editorial feel. No AI robots, no neural networks, no faces.
A decision model sits as a turnstile in front of the LLM — routing fast cases to direct actions and reserving the slow lane for genuine reasoning.

By Dr. Sanju Abraham, Fractional CTO, investor, multiple exits. Published October 15, 2026.

The short answer: In an AI agent stack, a fast decision model should sit in front of the expensive LLM calls. It classifies intent, selects tools, decides whether to loop again and chooses when to escalate. That leaves the frontier LLM for the steps that actually need prose or multi-step reasoning.

The shape I will walk through is the two-speed agent. It has a fast lane (decision model, then direct action) and a slow lane (LLM, then reasoning or writing). A typed boundary between the two lanes lets your tests, logs and dashboards see what happened at every step.

Picture a well-run restaurant kitchen. For ninety percent of the orders, a line cook just reads the ticket and plates the dish, with no thinking required. A chef steps in for the orders that need actual judgment: the allergies, the dietary swaps and the off-menu requests.

If every ticket went through the chef, service would collapse by 7 p.m. If every ticket went through the line cook, the picky guests would leave unhappy. The kitchen works because the ticket is read fast and routed to the right station. An AI agent stack has the same shape. The line cook is a decision model and the chef is your frontier LLM. The ticket router is the part you have to design on purpose, so this piece is about how to build that router.

The two-speed agent at a glance

This list sums up the two-speed agent, which puts a fast decision model in front of the LLM. It covers the two lanes, the five placements, the figures and what stays out of the fast lane. The sections below give the detail and the caveats, including which figures are my own estimates.

  • Core idea: A fast decision model sits in front of the expensive LLM calls, and the LLM runs only when prose or multi-step reasoning is needed
  • Fast path: 10–100 ms, with a direct tool call on a typed answer
  • Slow path: 1–5 seconds, with a frontier LLM writing replies, plans and summaries
  • Share of steps on the fast lane: 70 to 90 of every 100 steps, in the support-triage agents I have built
  • Five placements: Tool selection, intent routing, loop-break conditions, confidence-gated escalation and final-answer formatting
  • Decision-call speed: 70 to 500 milliseconds, per TypeSafe’s own numbers
  • Cost per token: One to two orders of magnitude below frontier LLM pricing, by my own estimate
  • Keep out of the fast lane: Prose a human will read, multi-step planning, novel category invention and trust decisions without human review

Where does a decision model fit in an AI agent stack?

A decision model fits anywhere an agent has to pick between a small set of next steps. Five choices qualify: which tool to call, which workflow branch to take, whether to keep looping, when to escalate to a human and what format the final answer should take. All five arrive as a Choose, Rate or Verify question, which a decision model handles natively in one typed call.

Most teams default to a different design. They let the frontier LLM decide all of these in the same call where it also reasons and writes the prose. That works, but by my own estimate it costs 10 to 50 times more per step. It also adds one to five seconds of latency to every branch. The agent’s behavior also becomes non-deterministic in a way nobody wants to debug on a Thursday night.

A decision model in front of the LLM is not a replacement for the LLM. It is a traffic controller. For the general chat-versus-decision framing this piece builds on, see chatbot vs decision model: what’s the difference?

What is the two-speed agent?

The two-speed agent is an architectural pattern where every step of the agent runs through a fast decision layer first. A step reaches the slow LLM layer only when the decision model says it genuinely needs reasoning. The pattern has two speeds, so the sections below describe each lane, explain why the split works and then show the reference diagram.

What are the fast path and the slow path?

  • Fast path (10–100 ms, cents per million calls). A decision model classifies the input, picks the tool, scores the risk, or verifies a flag. The agent acts on the typed answer directly, with no prose, no reasoning and no second call.
  • Slow path (1–5 seconds, dollars per million calls). A frontier LLM does what only an LLM can do: write a reply, plan a multi-step action, summarize a long document, or reason about an ambiguous situation.

The fast lane handles the bulk of the volume in most real agents. In the support-triage agents I have built with clients, the fast lane carries 70 to 90 of every 100 steps. The slow lane fires only when the user has asked an open-ended question. It also fires when the decision model’s confidence falls into the middle band of the three-band rule.

Why split the work this way?

The point is not to eliminate the LLM. The point is to stop paying LLM prices for decisions that a cheaper, faster, typed model can make equally well. The LLM budget then goes to the places where its reasoning is the deliverable. The underlying “System One / System Two” framing for why this split works is covered in what is a System One model?.

What does the two-speed agent look like?

The diagram below shows the reference shape. An event comes in, the decision model picks a lane, and a loop-break branch returns to the start.

THE TWO-SPEED AGENTA fast decision layer gates the slow LLM layer.EVENTuser turn,webhook, cronDECISION MODELChoose / Rate / Verifytool? route? loop?confidence 0.0–1.0high confneeds proseloop break / terminateFAST PATH · 10–100 msDirect tool calllookup, write, update, notify~70–90% of stepsSLOW PATH · 1–5 sLLM reasoning or prosedraft reply, plan, summarizetool chaining with reflection~10–30% of stepsSame agent, two speeds. The decision model decides which lane.
A decision model classifies, scores or verifies each step, then sends it down the fast or slow lane.

Five places a decision model earns its keep inside an agent

These are the five placements I come back to on almost every agent engagement. Each one is a Choose, Rate, or Verify question against the current agent state, nothing more exotic. Done with a decision model instead of a frontier LLM, each one cuts a specific class of latency and cost out of the stack. The first four decide what the agent does next, and the fifth decides how it answers.

Which placements pick the tool and route the request?

  1. Tool selection. Before you let the LLM pick which of twenty tools to call, let a decision model do it. A Choice over the tool list, with the user turn and a one-line description of each tool in context, usually returns the right tool in tens of milliseconds. Then you call the LLM only to fill in the arguments. On OpenAI’s function calling, this is the same shape as pre-pinning tool_choice to the function the classifier picked, instead of leaving it on "auto".
  2. Intent routing. The first step inside almost every agent is to ask what kind of request this is: billing question, feature request, outage report, abuse or chit-chat. A Choice across your intent taxonomy sends each request down a dedicated sub-graph with its own tools and system prompt. That is faster and more predictable, and far easier to monitor than a monolithic agent reasoning about everything.

Which placements decide when to stop or escalate?

  1. Loop-break conditions. Agent loops that call tools until “done” are a known tail-latency hazard. A Verify question, such as “Does the current state satisfy the user’s goal?”, run every N steps as a cheap decision call, catches finished tasks early. It also stops the LLM from inventing more work. Most frameworks call this shape a “conditional edge.”
  2. Confidence-gated escalation. Not every decision deserves the frontier LLM. Run the cheap decision model first. If its confidence is above 0.9, act on it. If it falls in the middle band, escalate the same question to the LLM, with the decision model’s answer and reasoning attached as a hint. You pay slow-lane prices only for the steps where the fast lane was unsure, which is the pattern in my three-band rule article.

What about the final answer?

  1. Final-answer formatting choice. Even at the end of an agent run, there is a decision: does the user want a one-line answer, a bullet list, a code block, a chart, or a form? A Choice across your output formats, driven by the user’s turn and the data you have in hand, picks the template before you ask the LLM to write prose into it. When the format is “lookup” or “none,” the fast lane answers without the LLM at all.

Those five do not exhaust the surface. They do cover most of the places where I see decision models pay for themselves on real agent stacks.

How much latency and cost do you actually save with a decision-first stack?

You save roughly one order of magnitude on each. The numbers depend on the model, the workload and the vendor, but the direction is consistent across every real deployment I have measured. Three things change: latency, cost per step and how well you can test the agent. The first two show up on the first day of traffic, and the third pays off every time you ship a change.

How much faster and cheaper is the fast lane?

  • Latency. A frontier LLM call on a short input takes 1 to 5 seconds. A decision model call (Jev, OpenAI’s structured outputs with a small model, or Anthropic’s strict tool use with Haiku) takes 70 to 500 milliseconds per TypeSafe’s own numbers. Replacing one LLM call with one decision call on the fast lane removes seconds from the critical path.
  • Cost per step. By my estimate, decision model pricing runs one to two orders of magnitude below frontier LLM pricing per token. Output tokens are shorter by construction, and you pay the LLM only on the slow lane. High-volume agents such as email triage, ticket routing and moderation see monthly bills drop by seventy to ninety percent in the deployments I have measured when they adopt the two-speed shape.

What does the typed boundary give you in testing?

  • Testability. The fast lane returns a typed value you can assert on in CI. You can golden-set your routing, your intent classification, and your loop-break logic. Prose answers from the slow lane still need judgment-based evaluation, but the agent’s structural behavior is now deterministic in a way plain LLM agents never are.

Treat the numbers above as directional. Benchmark your own workload before you commit to a redesign, because measuring is easy once the typed boundary is in place. The companion piece on reading decision-model benchmarks walks through how to do that without being fooled by vendor-reported figures.

Weighted-average latency and cost drop by roughly 5x when the decision layer handles the fast cases itself. Numbers are illustrative; benchmark your own workload.

What do agent frameworks give you today for decision-model gating?

Every major agent framework already supports the two-speed shape. You do not need a new library, but you do need to use the one you have on purpose. The notes below cover each framework in turn and link to its official documentation, because framework APIs change faster than articles do. Even so, the shape of the pattern holds.

How do LangGraph and Mastra support it?

  • LangGraph. The whole mental model is nodes connected by edges, and conditional edges let a routing function read state and pick the next node at runtime. That is exactly where a decision model belongs. The routing function calls a Choice or Verify, returns the label, and add_conditional_edges sends the graph down the matching lane. See the official LangGraph docs for the current conditional-edge API. Third-party tutorials cover the idea well, but check the version-specific signature before you commit.
  • Mastra. Mastra’s workflow steps and agent networks are a natural fit for the two-speed split, because a classifier step at the top of the workflow routes to one of several agent paths. The current API lives at Mastra’s docs. As with every framework in 2026, assume the surface will keep moving and treat vendor-reported behavior as a starting point, not a contract.

How do OpenAI and Anthropic support it?

  • OpenAI Assistants and Responses API. The tool_choice parameter accepts "auto", "required", "none", or a specific tool name. A decision model picks the tool, and your Responses call pins tool_choice to that tool and goes straight to arguments. OpenAI’s function calling guide is the authoritative reference for current behavior.
  • Anthropic Computer Use and strict tool use. The computer-use loop itself is a decision-and-act cycle, and Anthropic’s computer use docs describe strict tool-use primitives you can call with a smaller, faster Claude model as a decision gate in front of the frontier Claude that does the reasoning. The smaller model picks the next action, and the larger model runs only when the picked action’s own output is a dead end.

What about CrewAI and the OpenAI Agents SDK?

Both have equivalents: “task routing” in CrewAI and “handoffs” in the Agents SDK. The names change, but the pattern does not. A decision model, called before the LLM, decides which crew member or which agent gets the turn.

Hedge on specifics. Framework APIs in 2026 are still moving, but the pattern is not. A framework that lets you insert a function before the LLM call is enough to build a two-speed agent.

A reference architecture for the two-speed agent

Here is the minimum shape I ship on a two-speed agent build. It has seven blocks, and everything else is instrumentation. The specific framework barely matters, because the shape maps onto LangGraph, Mastra, the OpenAI Agents SDK or a hand-rolled state machine. The first four blocks take an event in and act on it. The last three produce the answer and keep the record.

What do the first four blocks do?

  • An ingress node. Normalizes the incoming event into a typed state object. User turn, webhook and cron all converge on one schema before anything else runs.
  • A decision node. Makes one call to a decision model with a bundle of Choose / Rate / Verify questions against the state. A common bundle is Choice("intent", [...]), Choice("next_tool", [...]), Verify("goal_satisfied?") and Score("urgency", 1, 5). It returns a typed struct with confidence scores on every field.
  • A router. Plain code that reads the decision struct and dispatches. High-confidence routes go straight to the fast lane. Middle-band confidences escalate to the slow lane with the decision struct attached as context. goal_satisfied branches to the terminate node.
  • A fast lane. Deterministic tool calls such as database writes, API calls and template renders do the actual work when the decision model is confident. No LLM is involved.

What do the last three blocks do?

  • A slow lane. The frontier LLM, with the decision struct and the conversation state as context. This is where you spend your LLM budget on purpose.
  • A terminate node. Formats and returns the final response. The format itself is a Choice (one-line, bulleted, structured, chart, silent).
  • A trace table. Every state transition, decision struct, and lane taken gets logged with the step id. This is the artifact your tests assert on and your dashboards graph. Without it, the two-speed shape is invisible in production.

Build those seven pieces and you have a two-speed agent. How I use a decision model in my own product shows the general discipline of putting a typed boundary at every seam of an AI feature. The broader frame is in AI strategy for SMB owners that survives contact with reality.

Seven blocks, two lanes, one trace. The minimum two-speed shape — ingress, decision, router, fast lane, slow lane, terminate, trace — maps onto any framework.

What NOT to put behind the decision gate

The decision model is a traffic controller, not a thinker. Four kinds of work belong in the slow lane every time, and they quietly cost you when you force them into the fast one.

  • Prose a human will read. Reply drafting, summaries, explanations, anything with voice. Decision models cannot write prose a human will pay attention to.
  • Multi-step planning across unknown subtasks. When the step after this one depends on reasoning about what might go wrong next, that is the LLM’s job. Decision models decide; they do not strategize.
  • Novel category invention. Choice picks from the list you supply. If the right answer is not in the list, you need an LLM to help you invent it. That is a one-time slow-lane job that then expands the fast lane’s vocabulary for every future call.
  • Trust decisions in production without human review above the gate. Confidence scores are approximate, and calibration isn’t automatic. The three-band rule’s REVIEW band is where humans belong, so the fast lane should hand off there rather than hide the uncertainty.

If a step on your agent fits one of those four, do not compress it into a decision call. Let the slow lane handle it, because the savings elsewhere pay for the places you leave alone.

Frequently asked questions

These are the questions builders ask most often about decision models in an agent stack. The answers cover frameworks, replacing the LLM, tool selection, latency and vendors. They use the same figures as the sections above. Each answer is short enough to read on its own, and each one links back to the longer section where there is one.

Do I need an agent framework to use decision models?

No. The two-speed shape is a pattern, not a library. A plain state machine, a Node.js function, or a Python script with an if/else on the decision model’s output is a perfectly valid implementation. Frameworks like LangGraph, Mastra, and the OpenAI Agents SDK make certain features (tracing, retries, resumability) easier, but they are not required to start. Build the pattern first, and adopt a framework when the complexity earns it.

What agent frameworks already support decision-model gating?

All the mainstream ones in some form. LangGraph has conditional edges, and OpenAI’s Responses API has tool_choice. Anthropic’s strict tool use is exactly the shape a decision model needs. Mastra, CrewAI, and the OpenAI Agents SDK all expose equivalent routing primitives. Treat vendor-reported behavior as a starting point and benchmark your own workload before committing to a framework-specific API.

When does a decision model REPLACE the LLM in an agent?

Whenever the step’s output is a label, number, probability, or tool choice, and the user never sees the output as prose. Routing, scoring, flagging and selecting are all pure decision model territory. The LLM comes back the moment the deliverable is language a human will read or multi-step reasoning across unknown subtasks. See chatbot vs decision model for the longer version.

What’s a tool-selection decision model?

It’s a decision model whose only job is picking which tool to call next from a bounded list. You do not ask the frontier LLM “which of these twenty tools fits this user turn?” You ask a decision model the same question as a Choice across the tool names. The LLM then runs only to fill in the arguments for the pinned tool. That is dramatically cheaper and more deterministic than letting it search the whole tool space.

How much latency do you save in a typical two-speed agent?

Enough to notice. On the fast lane, you replace a 1–5 second LLM call with a 70–500 ms decision call. Weighted across typical traffic, average step latency drops by roughly 5x. Treat the exact numbers as directional, because your results will depend on model, prompt, network, and workload. The direction is consistent across every two-speed agent I have measured.

Can I use the same vendor for the fast and slow lanes?

Yes, and most teams should. OpenAI’s small models (or structured outputs on the frontier model) can handle the fast lane while GPT-5 handles the slow lane. Anthropic’s Haiku-class model can front a Sonnet-class reasoning step. TypeSafe AI’s Jev gates calls to whichever frontier LLM your product already uses. The two-speed pattern is vendor-agnostic, and the shape is what matters.

How is this different from “just use a smaller model for routing”?

The two-speed pattern is about the typed boundary between the fast and slow lanes, not just the model size. A smaller LLM that still returns prose doesn’t give you testability, confidence scores, typed state transitions or deterministic behavior. Those are what make the pattern pay off. A decision model is the specific shape that turns “use a smaller model” into a production-grade pattern. It answers Choose, Rate, or Verify, with confidence attached.


If you are architecting an AI agent right now, the fast-lane / slow-lane split may feel bigger than one afternoon. That boundary-by-boundary design call is exactly what a Fractional CTO is paid to make. One hour on the right partition can save a quarter of engineering time. The mistakes in the first six months of an agent stack are the expensive ones. More pieces in this thread live in the AI Strategy archive, including the companion deep-dive on choosing a decision API in 2026.

  • #ai-agents
  • #decision-api
  • #architecture
  • #langgraph
  • #builders
  • #ai-strategy

Need a CTO without the headcount?

Schedule a 30-minute intro call. We'll listen first, recommend second.