{"course":{"slug":"agents-and-automation","title":"Agents and Automation","url":"https://addaly.com/learn/agents-and-automation","level":"intermediate","track":"build"},"lesson":{"slug":"unit-economics-of-a-run","title":"What one run costs, and what it is worth","url":"https://addaly.com/learn/agents-and-automation/unit-economics-of-a-run","position":7,"of":72,"minutes":9,"answer":"Price one run in tokens, seconds and the human minutes it replaces before you build it: the transcript is re-sent every step, so the fifth step is cheap and the twentieth is not.","keyIdea":"Price one run in tokens, seconds and the human minutes it replaces before you build it: the transcript is re-sent every step, so the fifth step is cheap and the twentieth is not."},"body":{"format":"markdown","text":"## Put a number on it before you build it\n\nYou have already seen why an agent's context grows: every step re-sends the whole transcript. Here we turn that into money, because \"it is only a few cents\" and \"it is four thousand dollars a month\" are the same sentence at different volumes.\n\nTake a modest agent. Assumptions, stated openly so you can substitute your own:\n\n- system prompt plus tool definitions: **2,000 tokens**, sent every step\n- each step adds roughly **700 tokens** of tool result and **200 tokens** of model text\n- the run takes **10 steps**\n\nStep *n* therefore sends about 2,000 + 900 × (*n* − 1) tokens. Across ten steps:\n\n- fixed part: 10 × 2,000 = **20,000**\n- growing part: 900 × (0 + 1 + … + 9) = 900 × 45 = **40,500**\n- total input: about **60,500 tokens**, plus maybe 2,000 tokens of output\n\nAt illustrative prices of $3 per million input tokens and $15 per million output tokens, that is $0.18 + $0.03, about **21 cents a run**.\n\nTwenty-one cents feels free. Ten thousand runs a month is **$2,100**, which is a person's salary in much of the world. Both numbers are true; only the second one gets you asked about it in a meeting.\n\n## Two levers that actually move the number\n\n**Cut steps.** The growing part scales with the square of the step count, so it is the first thing to attack. The same agent at five steps: 5 × 2,000 + 900 × 10 = 19,000 tokens, under a third of the cost. Removing five steps beats any amount of prompt tuning.\n\n> Figure: The same agent, priced by chain length. Bars (thousand input tokens per run): 5 steps 19; 10 steps 60.5; 15 steps 124.5; 20 steps 211. A 2,000-token prefix, 900 tokens added per step. Only the number of steps changes. Ten steps to twenty more than triples the input, because every step re-sends everything before it.\n\n**Cache the prefix.** Providers let you mark a stable prefix (system prompt and tool definitions) as cacheable. Cached reads typically cost around a tenth of normal input tokens; writing the cache costs slightly more than normal. In our example that turns the 20,000 fixed tokens into roughly 2,000 chargeable ones.\n\nThe catch is exact and worth memorising: **the cached prefix must be byte-identical**. Put a timestamp, a session id or a shuffled tool list at the top of your system prompt and the cache never hits, silently, forever. Nothing errors. Your bill is several times what you expected. Sort your tool definitions, freeze the wording, and put anything that varies *after* the cached block.\n\n## Latency is a budget too\n\nEach step is a network round trip: model call, tool call, model call. Three to eight seconds per step is normal. Ten steps is a minute or more.\n\nNobody waits a minute at a text box. So a ten-step agent is a background job with a notification, not a chat feature, and if you need it to feel interactive, the answer is again fewer steps, not a faster model.\n\n## What it replaces\n\nFinish the sum on the other side. If the task takes a person four minutes and you value that at ₹300 an hour, the human cost is ₹20. If your run costs ₹18, gets it right 80% of the time, and a person checks every output anyway, you have added a step and saved nothing.\n\nAutomation pays when it removes the human minutes entirely, or when it makes something possible that was not: every invoice checked instead of a sample.\n\n## Measure, do not estimate\n\nEvery provider returns token usage in the response. Write one row per run from day one: run id, steps, input tokens, output tokens, cached tokens, wall-clock seconds, outcome. That is a CSV, or a small table, and it takes twenty minutes.\n\nWithout it you will argue about cost from memory. With it you can point at the one step that doubled last Tuesday."},"check":{"question":"An agent averages 12 steps at about $0.30 a run. A team proposes two changes: (a) enable prompt caching on the 3,000-token system prompt and tool block, or (b) restructure so the same work takes 6 steps. Which is likely to cut cost more, and why?","options":[{"text":"Caching, because the system prompt is the largest single block in the request.","correct":false,"tempting":"Fixes the constant term while ignoring the growing one; by step twelve the re-sent transcript, not the system prompt, dominates the request."},{"text":"Halving the steps, because the re-sent transcript grows with the square of the step count while caching only discounts the fixed prefix.","correct":true},{"text":"Neither materially; cost is driven by output tokens, which neither change touches.","correct":false,"tempting":"Assumes output dominates. Agent runs are heavily input-skewed, because every step re-reads everything before it."},{"text":"Caching, because cached reads are free rather than discounted.","correct":false,"tempting":"Overstates the discount. Cached reads are cheaper, typically around a tenth of the price, not free, and writing the cache costs more than a normal token."}]},"prev":{"slug":"why-demos-fail","title":"Why the demo worked and production did not","url":"https://addaly.com/learn/agents-and-automation/why-demos-fail"},"next":{"slug":"buy-build-or-wait","title":"Buy it, build it, or wait for it","url":"https://addaly.com/learn/agents-and-automation/buy-build-or-wait"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'What one run costs, and what it is worth', in Agents and Automation. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/agents-and-automation/unit-economics-of-a-run (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"What one run costs, and what it is worth","courseTitle":"Agents and Automation","module":{"index":1,"slug":"deciding-what-to-build","title":"Before you build: script, workflow, or agent"},"answer":null,"keyIdea":"Price one run in tokens, seconds and the human minutes it replaces before you build it: the transcript is re-sent every step, so the fifth step is cheap and the twentieth is not.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"bars","unit":"thousand input tokens per run","title":"The same agent, priced by chain length","series":[{"label":"5 steps","value":19},{"label":"10 steps","value":60.5},{"label":"15 steps","value":124.5},{"label":"20 steps","value":211,"highlight":true}],"caption":"A 2,000-token prefix, 900 tokens added per step. Only the number of steps changes. Ten steps to twenty more than triples the input, because every step re-sends everything before it."},"alt":"Figure: The same agent, priced by chain length. Bars (thousand input tokens per run): 5 steps 19; 10 steps 60.5; 15 steps 124.5; 20 steps 211. A 2,000-token prefix, 900 tokens added per step. Only the number of steps changes. Ten steps to twenty more than triples the input, because every step re-sends everything before it."}},"blocks":[{"t":"h2","id":"put-a-number-on-it-before-you-build-it","runs":[{"text":"Put a number on it before you build it"}]},{"t":"p","runs":[{"text":"You have already seen why an agent’s context grows: every step re-sends the whole transcript. Here we turn that into money, because “it is only a few cents” and “it is four thousand dollars a month” are the same sentence at different volumes."}]},{"t":"p","runs":[{"text":"Take a modest agent. Assumptions, stated openly so you can substitute your own:"}]},{"t":"ul","items":[[{"text":"system prompt plus tool definitions: "},{"text":"2,000 tokens","b":true},{"text":", sent every step"}],[{"text":"each step adds roughly "},{"text":"700 tokens","b":true},{"text":" of tool result and "},{"text":"200 tokens","b":true},{"text":" of model text"}],[{"text":"the run takes "},{"text":"10 steps","b":true}]]},{"t":"p","runs":[{"text":"Step "},{"text":"n","i":true},{"text":" therefore sends about 2,000 + 900 × ("},{"text":"n","i":true},{"text":" − 1) tokens. Across ten steps:"}]},{"t":"ul","items":[[{"text":"fixed part: 10 × 2,000 = "},{"text":"20,000","b":true}],[{"text":"growing part: 900 × (0 + 1 + … + 9) = 900 × 45 = "},{"text":"40,500","b":true}],[{"text":"total input: about "},{"text":"60,500 tokens","b":true},{"text":", plus maybe 2,000 tokens of output"}]]},{"t":"p","runs":[{"text":"At illustrative prices of $3 per million input tokens and $15 per million output tokens, that is $0.18 + $0.03, about "},{"text":"21 cents a run","b":true},{"text":"."}]},{"t":"p","runs":[{"text":"Twenty-one cents feels free. Ten thousand runs a month is "},{"text":"$2,100","b":true},{"text":", which is a person’s salary in much of the world. Both numbers are true; only the second one gets you asked about it in a meeting."}]},{"t":"h2","id":"two-levers-that-actually-move-the-number","runs":[{"text":"Two levers that actually move the number"}]},{"t":"p","runs":[{"text":"Cut steps.","b":true},{"text":" The growing part scales with the square of the step count, so it is the first thing to attack. The same agent at five steps: 5 × 2,000 + 900 × 10 = 19,000 tokens, under a third of the cost. Removing five steps beats any amount of prompt tuning."}]},{"t":"p","runs":[{"text":"Cache the prefix.","b":true},{"text":" Providers let you mark a stable prefix (system prompt and tool definitions) as cacheable. Cached reads typically cost around a tenth of normal input tokens; writing the cache costs slightly more than normal. In our example that turns the 20,000 fixed tokens into roughly 2,000 chargeable ones."}]},{"t":"p","runs":[{"text":"The catch is exact and worth memorising: "},{"text":"the cached prefix must be byte-identical","b":true},{"text":". Put a timestamp, a session id or a shuffled tool list at the top of your system prompt and the cache never hits, silently, forever. Nothing errors. Your bill is several times what you expected. Sort your tool definitions, freeze the wording, and put anything that varies "},{"text":"after","i":true},{"text":" the cached block."}]},{"t":"h2","id":"latency-is-a-budget-too","runs":[{"text":"Latency is a budget too"}]},{"t":"p","runs":[{"text":"Each step is a network round trip: model call, tool call, model call. Three to eight seconds per step is normal. Ten steps is a minute or more."}]},{"t":"p","runs":[{"text":"Nobody waits a minute at a text box. So a ten-step agent is a background job with a notification, not a chat feature, and if you need it to feel interactive, the answer is again fewer steps, not a faster model."}]},{"t":"h2","id":"what-it-replaces","runs":[{"text":"What it replaces"}]},{"t":"p","runs":[{"text":"Finish the sum on the other side. If the task takes a person four minutes and you value that at ₹300 an hour, the human cost is ₹20. If your run costs ₹18, gets it right 80% of the time, and a person checks every output anyway, you have added a step and saved nothing."}]},{"t":"p","runs":[{"text":"Automation pays when it removes the human minutes entirely, or when it makes something possible that was not: every invoice checked instead of a sample."}]},{"t":"h2","id":"measure-do-not-estimate","runs":[{"text":"Measure, do not estimate"}]},{"t":"p","runs":[{"text":"Every provider returns token usage in the response. Write one row per run from day one: run id, steps, input tokens, output tokens, cached tokens, wall-clock seconds, outcome. That is a CSV, or a small table, and it takes twenty minutes."}]},{"t":"p","runs":[{"text":"Without it you will argue about cost from memory. With it you can point at the one step that doubled last Tuesday."}]}],"check":{"question":[{"text":"An agent averages 12 steps at about $0.30 a run. A team proposes two changes: (a) enable prompt caching on the 3,000-token system prompt and tool block, or (b) restructure so the same work takes 6 steps. Which is likely to cut cost more, and why?"}],"options":[{"text":[{"text":"Caching, because the system prompt is the largest single block in the request."}],"correct":false,"tempting":[{"text":"Fixes the constant term while ignoring the growing one; by step twelve the re-sent transcript, not the system prompt, dominates the request."}]},{"text":[{"text":"Halving the steps, because the re-sent transcript grows with the square of the step count while caching only discounts the fixed prefix."}],"correct":true,"tempting":null},{"text":[{"text":"Neither materially; cost is driven by output tokens, which neither change touches."}],"correct":false,"tempting":[{"text":"Assumes output dominates. Agent runs are heavily input-skewed, because every step re-reads everything before it."}]},{"text":[{"text":"Caching, because cached reads are free rather than discounted."}],"correct":false,"tempting":[{"text":"Overstates the discount. Cached reads are cheaper, typically around a tenth of the price, not free, and writing the cache costs more than a normal token."}]}],"order":[2,3,0,1],"why":null},"prev":{"slug":"why-demos-fail","title":"Why the demo worked and production did not","minutes":8},"next":{"slug":"buy-build-or-wait","title":"Buy it, build it, or wait for it","minutes":8}}}