Loop Engineering
The Cost-Aware Agent Loop
Jun 28, 2026 · 5 min read
Most agent stacks pick a model once, at design time, and then pay that model's price for every step regardless of difficulty. Classification, extraction, and formatting steps do not need frontier reasoning; planning and repair often do.
Treating the loop as a controller lets us attach a budget to a task rather than a model to a workflow. Each step emits a difficulty estimate, the router selects the cheapest model whose historical success rate clears the threshold, and escalation happens only on verifier failure.
In enterprise workloads we consistently see 60–80% of steps safely served by small models, with end-to-end quality held flat. The savings come from the distribution of easy steps, not from downgrading the hard ones.
The operational requirement is per-step telemetry: success rate, latency, and cost per model per step type. Without it, routing is guesswork dressed as optimization.
Related reading
More in Loop Engineering
Harnesses That Rewrite Themselves
The scaffolding around a model is now the fastest-moving part of the system. What happens when the scaffolding starts editing itself?
Agentic Research Loops: Letting Systems Run Their Own Experiments
An agent that proposes, runs, and grades its own ablations changes the unit economics of research — if you get the verifier right.