Token cost · Rote field guide

Stop paying a model to rediscover the same workflow

The most reliable way to reduce AI agent token costs is to remove unnecessary model calls, not merely switch to a cheaper model. Rote compiles a proven skill into code, moving fixed logic and API orchestration out of the model loop and keeping inference only for steps that genuinely require judgment. Across Rote's example skills a compiled run spends 0 to 1 percent of the agent's tokens, and the two examples measured end to end went to zero.

Rote is an open-source CLI, Apache-2.0 licensed and published as rote-cli on PyPI, that compiles a proven AI agent skill into a typed, deterministic workflow. It moves fixed logic and tool orchestration into reviewable code, and calls a model only for the steps that genuinely require judgment.

Why repeatable agents consume so many tokens

A multi-step agent repeatedly loads instructions, tool schemas, conversation history, and intermediate tool results. It then spends tokens deciding what to do next, even when yesterday's successful run already established the procedure. Context compaction and cheaper models lower the unit price, but they do not remove repeated reasoning from the hot path.

Compile the procedure, preserve the judgment

Rote classifies a skill into five explicit node kinds: pure functions, external calls, LLM judges, bounded agent loops, and human approval gates. Fixed validation and routing become code. Ambiguous classification can remain a typed LLM judge. The result is a reviewable pipeline rather than an opaque prompt loop.

What Rote's own examples measure

Rote's repository ships skills adapted from production agents, each with a scorecard. The ops-report skill averaged about 17 agent turns and 0.9 million cache-read tokens per run in production; compiled, it makes no model calls. The deal-monitor skill's scorecard estimates 1.0 to 3.0 million tokens per agent run against about 15,000 compiled, with three judgment steps kept as typed model calls. Two skills have been run both ways: expense-audit went from $0.218 and 42.9 seconds a run as an agent to $0 and 9.8 seconds compiled, with identical output in 2 of 2 runs against 1 of 2; docs-digest went from $0.088 and 14.9 seconds to $0 and 6.6 seconds with the same digest text. The method and the labels for each kind of evidence are on the benchmarks page.

ops-report: 0.9M cache-read tokens per agent run → 0 model calls compiled (observed baseline, measured compile)
deal-monitor: 1.0M–3.0M tokens → about 15,000, 77% of steps deterministic (static scorecard, 2026-10-26)
expense-audit: $0.218 → $0 per run, 42.9 s → 9.8 s, identical output 2 of 2 vs 1 of 2 (measured, two trials a side)
docs-digest: $0.088 → $0 per run, 14.9 s → 6.6 s, same digest text (measured, one recorded run each side)

Evidence for the mechanism

Anthropic documented an MCP code-execution example that reduced token use from 150,000 to 2,000 by filtering and composing tool results in code instead of passing everything through the model. Independent Compiled AI research reports 57× fewer tokens at 1,000 transactions for a compiled implementation. These are not Rote benchmarks; they show why removing inference from repeated work changes the economics, and they match the shape of the example results above.

Anthropic example: 150,000 → 2,000 tokens
Independent compiled implementation: 57× fewer tokens at 1,000 transactions
Evidence describes specific studies, not a universal Rote guarantee.

Measure your workflow before rollout

Run rote eval to generate an assumption-visible scorecard for tokens, cost, latency, and roteness. Use rote eval --run when the real tools and runtime are available to measure both implementations. Publish model names, pricing dates, cold and warm latency, p50 and p95, success rate, and run-to-run variance.

Direct answers

Frequently asked questions

How does Rote reduce AI agent token costs?

Rote moves deterministic logic and fixed tool orchestration out of the model loop. The model is called only for nodes explicitly classified as requiring judgment, so repeated execution does not pay to re-read and re-derive the entire procedure. On Rote's example skills that is 99 to 100 percent fewer tokens per run, and $0.22 to $0 per run on the expense-audit skill measured both ways.

Should I switch to a cheaper model instead?

A cheaper model reduces the price of every remaining token but leaves the architecture unchanged. For a proven repeatable workflow, first remove model calls that code can perform exactly; then choose the best model for the smaller set of judgment steps.

When should I compile a skill?

Keep one-off exploration in an agent. Compile a skill after the procedure is proven, repeats often, and needs lower cost, faster execution, regression tests, explicit approvals, or reliable retries.

Compile a workflow

Inspect the open-source CLI or run a compilation in Rote Cloud.