Guide · 2026-05-19 · 8 min read

Model-Driven Workflows: How Autonomous Agent SDKs Are Slashing Token Usage

Hard-coded execution graphs are giving way to model-driven workflows. Frameworks like the AWS Strands Agents SDK let models decide which tools to call to reach a goal — and the token savings are dramatic.

The End of the Hard-Coded Agent Graph

For most of 2024 and 2025, the dominant pattern for shipping AI agents was the explicit execution graph: a developer hand-wires every step, every branch, every fallback. Tools like LangGraph, Temporal-style state machines, and bespoke orchestrators encoded the workflow as nodes and edges, and the model was just a smart label inside a box.

That pattern is now hitting a wall. The graphs are brittle, they explode in complexity as soon as the task surface widens, and — most painfully — they burn tokens on every node transition, re-feeding the model the same context, the same tool schemas, and the same instructions over and over.

A new generation of frameworks, led by the AWS Strands Agents SDK, is flipping the model: instead of the developer drawing the graph, the model figures out how to use tools autonomously to reach a goal. This is the model-driven workflow, and early adopters are reporting token-usage reductions of 40–70% versus their previous hand-wired pipelines.

What "Model-Driven" Actually Means

In a model-driven workflow, you give the agent three things and nothing else:

  • A goal stated in natural language ("triage this support ticket and either resolve it or escalate with a structured summary").
  • A toolbox of callable functions with typed schemas (search_kb, get_order, refund, escalate_to_human).
  • A stopping condition (the goal is satisfied, a budget is hit, or the model declares it's done).

The model then decides — turn by turn — which tool to call, with what arguments, in what order, and when to stop. There is no pre-drawn graph. There is no "if intent == refund, go to node 4." The control flow lives inside the model's reasoning trace.

This is the same shift databases went through in the 1970s when imperative record-by-record code lost to declarative SQL. You stop telling the system *how*. You tell it *what*, and let the planner figure out the path.

Why It Cuts Tokens So Aggressively

Hard-coded graphs are token-hungry for three structural reasons. Model-driven workflows kill all three.

1. No redundant context re-injection

In a graph, every node typically receives the full conversation state, the full tool catalog, and a node-specific system prompt — because each node is, technically, a fresh LLM call. A 6-node workflow on a 4k-token conversation can easily ship 24k+ input tokens just to traverse the graph once.

In Strands and similar SDKs, the agent runs as a single continuous loop with prefix caching enabled by default. The system prompt and tool schemas are sent once and cached; subsequent turns re-use the cached prefix at ~10% of the original cost. The same 6-step task drops to roughly 6–8k effective input tokens.

2. Tools only fire when needed

A hand-wired graph often calls tools defensively — fetching user context, account state, and recent history *just in case* the next branch needs them. The model-driven loop only calls a tool when it has decided it actually needs the result. On a typical customer-support task, that alone eliminates 2–4 wasted tool round-trips, each of which would have cost both the tool-call tokens and the result tokens fed back in.

3. Early stopping is the default

Graphs run to completion. A model-driven agent stops the moment the goal is satisfied — often after 2 turns when the developer had budgeted for 5. Aggregated across millions of requests, that's where the biggest line on the invoice quietly disappears.

A Concrete Comparison

Here's the same support-triage task implemented both ways, with measured token usage on a representative 500-ticket sample.

The output-token drop is smaller because the model still has to *write* the final response. The input-side savings are where the architectural win shows up.

What You Give Up

Model-driven workflows are not a free lunch. Three trade-offs are worth naming out loud before you migrate:

  • Determinism. A graph is auditable: you can point to node 3 and say "this always runs." A model-driven agent might take a different path on identical input. For regulated flows (medical, legal, financial transactions over a threshold), you still want explicit guardrails — most teams keep a thin policy layer that intercepts high-stakes tool calls.
  • Debuggability. When something goes wrong, you're debugging a reasoning trace, not a known node. Strands and Bedrock Agents both ship structured trace exports that help, but expect to invest in observability tooling.
  • Capability floor. This pattern only works with models strong enough to do real tool planning. GPT-5-mini, Claude Sonnet 4.5, Gemini 2.5 Flash and up are all comfortable here. Anything weaker and you'll watch the agent loop forever or skip required steps.

When to Migrate

A good rule of thumb: if your current agent has more than 4 nodes and you're already paying for prompt caching, you're almost certainly leaving 50%+ of your token budget on the table. Pilot one workflow on Strands (or Bedrock Agents, or the OpenAI Assistants v2 tool-loop) for two weeks, measure cost-per-completed-task end to end, and let the invoice make the decision.

The teams winning on AI unit economics in 2026 are not the ones writing the cleverest prompts. They're the ones who stopped writing the graph.