agentic-ai-engineering/site/.vitepress/dist/assets/blog_posts_three-x-rule.md....

8 lines
5.0 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{c as s,Q as e,j as i,m as a}from"./chunks/framework.BPKcPtvA.js";const u=JSON.parse('{"title":"The 3x Rule of Agent Costs","description":"","frontmatter":{},"headers":[],"relativePath":"blog/posts/three-x-rule.md","filePath":"blog/posts/three-x-rule.md","lastUpdated":1780488472000}'),n={name:"blog/posts/three-x-rule.md"};function l(h,t,r,o,p,d){return e(),i("div",null,[...t[0]||(t[0]=[a(`<h1 id="the-3x-rule-of-agent-costs" tabindex="-1">The 3x Rule of Agent Costs <a class="header-anchor" href="#the-3x-rule-of-agent-costs" aria-label="Permalink to &quot;The 3x Rule of Agent Costs&quot;"></a></h1><p><strong>June 10, 2026</strong></p><p>Here is a rule that will save you from budget surprises: <strong>production agent costs 3x your prototype estimate.</strong></p><h2 id="why-the-multiplier-exists" tabindex="-1">Why the Multiplier Exists <a class="header-anchor" href="#why-the-multiplier-exists" aria-label="Permalink to &quot;Why the Multiplier Exists&quot;"></a></h2><table tabindex="0"><thead><tr><th>Phase</th><th>Multiplier</th><th>What Happens</th></tr></thead><tbody><tr><td>Prototype</td><td>1x</td><td>Happy path works perfectly</td></tr><tr><td>With retries</td><td>1.5x</td><td>Failed tool calls retry, edge cases handled</td></tr><tr><td>Production</td><td>3x</td><td>Monitoring, error handling, observability, security</td></tr></tbody></table><h2 id="where-the-cost-goes" tabindex="-1">Where the Cost Goes <a class="header-anchor" href="#where-the-cost-goes" aria-label="Permalink to &quot;Where the Cost Goes&quot;"></a></h2><p>Output tokens dominate — about 70% of total cost. The model&#39;s reasoning is the expensive part. Input tokens (context) are about 20%. Cached tokens are 10%.</p><p>Every tool call costs 3-5x more than the call itself:</p><ul><li>Planning which tool to use</li><li>Executing the tool</li><li>Error recovery if it fails</li><li>Parsing the result</li><li>Adding the result back to context</li></ul><h2 id="quick-estimation" tabindex="-1">Quick Estimation <a class="header-anchor" href="#quick-estimation" aria-label="Permalink to &quot;Quick Estimation&quot;"></a></h2><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> estimate_cost</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(turns, tokens_per_turn, price_per_m):</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> base </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> turns </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tokens_per_turn </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> price_per_m </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1_000_000</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;prototype&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: base,</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;with_retries&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: base </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1.5</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;production&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: base </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 3.0</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span></code></pre></div><h2 id="budget-accordingly" tabindex="-1">Budget Accordingly <a class="header-anchor" href="#budget-accordingly" aria-label="Permalink to &quot;Budget Accordingly&quot;"></a></h2><p>If your prototype agent costs $0.10 per task, plan for $0.30 in production. At 10,000 tasks per month, that is $3,000 per month, not $1,000. The 3x rule keeps you honest.</p><hr><p><em>From Module 6 of the <a href="/">Agentic Engineering Course</a>. The full module covers cost optimization, cascade routing, and pass@k evaluation.</em></p>`,15)])])}const c=s(n,[["render",l]]);export{u as __pageData,c as default};