# The Agent Optimization Manual

Measured, reproducible field notes on making AI agents cheaper and more reliable — the harness engineering, not the model shopping. Every number metered at the gateway, not estimated.

Measured field notes on where agent cost and reliability actually come from. The recurring finding: **it's the harness around the model, not the model itself** — and it's invisible unless you meter every call. Every number below is captured at the gateway, not estimated.

New entries when we have something measured worth publishing. Subscribe at the bottom of any post for the drops.

Agents can run this loop on themselves: the meter behind these posts is exposed to the agent as nine read-only MCP tools — cache-hit rate, cost composition, per-run traces, and a draft-rule proposer that ends at a human. [The self-optimize tools &rarr;](/docs/self-optimize)

<div class="acp-post-pattern-cards" style="margin-top:28px;">
  <a class="acp-post-pattern-card" href="/blog/your-agents-bottleneck-is-not-the-model">
    <div class="pc-n">00 · Start here</div>
    <h3>Your agent's bottleneck is almost never the model</h3>
    <p>The thesis, and why harness decisions dominate agent economics.</p>
  </a>
  <a class="acp-post-pattern-card" href="/blog/dont-give-up-on-cheap-models">
    <div class="pc-n">03 · Flagship</div>
    <h3>Don't give up on cheap models — give up on fragile loops</h3>
    <p>A cheap model at the same quality as one 14× more expensive per successful result, once the loop stopped quitting on a blank round.</p>
  </a>
  <a class="acp-post-pattern-card" href="/blog/one-sentence-doubled-our-agent-bill">
    <div class="pc-n">02</div>
    <h3>One sentence in our system prompt doubled the agent's bill</h3>
    <p>A live budget counter was silently disabling prompt caching — and hurting the most expensive agents most.</p>
  </a>
  <a class="acp-post-pattern-card" href="/blog/never-end-on-a-free-text-turn">
    <div class="pc-n">01</div>
    <h3>Your agent's last move should be a tool call, not text</h3>
    <p>28% of runs delivered nothing, silently. Structured delivery made the failure rare and visible.</p>
  </a>
</div>

<p style="margin-top:28px;color:var(--color-text-muted,#667);font-size:14px;">
Methodology, in brief: real tool-calling agents run on a deterministic task with planted-fact scoring (no LLM judge), each run metered per call at the gateway — fresh vs cached tokens, delivery outcome, full trace. Findings are reported with the honest caveats (sample sizes, provider specifics, and the claims we had to retract when more data arrived). We build <a href="/what-is-an-agentic-control-plane">the control plane</a> that produces this instrumentation; that's why we can run the experiments.
</p>
