frontinus Get in touch

Tokenomics & AI FinOps · 6 min read

Managing Claude and LLM token spend: five levers that hold quality

Falling per-token sticker prices are a mirage when autonomous agents scale. Monthly LLM invoices rarely spike from simple chat usage; they spike when multi-step agent loops silently burn 5x to 30x more tokens re-sending context histories, unused MCP tool schemas, and uncached documents on every turn.

Many teams start testing Claude or other frontier models at a few hundred dollars per month, then find themselves looking at a five-figure bill two quarters later with no clear link to business output. In multi-step agent loops, every tool call and retry re-sends the system prompt, conversation history, attached tool definitions, and retrieved records. Production workload traces routinely show more than half of billed input tokens are repeated context rather than new work.

Controlling that bill starts by tracking the right unit metric: cost per accepted output, including retries, tool calls, and human correction time. A cheap model that hallucinates twice and forces a ten-minute manual rewrite costs far more than a routed pipeline that gets the record right on pass one.

Illustrative workflow cost anatomy

Where agentic token bills go before and after architectural tuning

Illustrative proportions showing how repeated context, tool schemas, and unrouted clerical calls dominate agent bills. Actual savings depend on task mix, cache hit rate, and eval pass thresholds.

1. Eval-driven model routing

Most operational workflows mix clerical steps with complex judgment. Classifying a maintenance ticket, identifying a document type, or normalizing vendor names does not require your most expensive reasoning tier. Frontier models earn their price on ambiguous lease clauses, cross-document synthesis, and variance explanations.

Build a representative evaluation set of 30 to 50 real records first, measure candidate lightweight tiers against your baseline, and route only the steps where acceptance criteria hold.

2. Prompt caching (and avoiding the 5-minute TTL trap)

Major model APIs heavily discount repeated prompt prefixes (up to 90% off cached input reads on supported tiers, paired with a modest write surcharge). That pays off quickly when a workflow runs multiple turns against the same policy handbook, lease schema, or system instructions.

The operational trap is cache expiration. Standard prompt caches frequently expire after five minutes of inactivity. If a workflow pauses six minutes for human review, or places a dynamic timestamp at the top of the system prompt, every subsequent turn misses the cache and re-pays the higher write rate. Put static instructions and schemas first, keep dynamic variables at the end, and batch sequential steps within the cache window.

3. Strip out tool-schema and context bloat

Wiring an agent to 30 or 40 MCP tools or API endpoints injects dozens of verbose JSON schemas into every request, burning thousands of input tokens before the user asks a single question. Load only the tool subset needed for the active step, retrieve only the relevant lease clauses or ledger rows instead of whole PDFs, and summarize intermediate tool responses cleanly.

4. Use deterministic code for math and validation

Never pay a language model to sum a rent roll, compute NOI, reconcile a CAM pool, or calculate IRR. Language models burn reasoning tokens and still risk arithmetic drift. Use the model to extract structured inputs with source citations, pass those fields to audited SQL or Python for calculations, and invoke the model again only when an exception needs plain-English commentary.

5. Batch overnight jobs, attribute spend, and enforce hard loop caps

Nightly lease audits, invoice checks, listing hygiene sweeps, and morning portfolio briefs do not need sub-second responses. Provider batch APIs commonly cut inference rates by roughly 50% for asynchronous queues. Pair batching with FinOps-style token attribution (tagging every call by workflow, agent, cache hit rate, and retry count), hard per-run token budgets, max retry limits, and automated spend alerts so a stuck retry loop never burns through a monthly budget over a weekend.

What could AI do for your business?

Start with a real workflow, a measurable baseline and the systems you already use.