AX-300 · Lesson 11 of 12 · Module 4: Ship and Improve · 3:09

Count the cost per run

A run costs the tokens the agent reads and writes at every step plus any tool fees; each step re-reads the instructions, the notes and everything gathered so far, so each extra step costs more than the last, and agents cost several times as much as a chat. Compare a month’s cost, tests included, with the results actually used (cost per useful result), with the review time beside it. A budget in the instructions is only a request: set hard caps in the settings on steps, time and spend per run, limit retries, and add a daily cap and an alert before a cap; an alert alone stops nothing. Worked example: a normal run cost about 45p; a stuck retry loop ran 160 times and cost £31 overnight; a month of runs and tests cost about £33, about £8 per campaign.

Frame from lesson 11 of Sophyx Certified AI Agent Builder – Professional, "Count the cost per run"

What you will learn

  • Work out what one run costs
  • Compare the cost with the results you used
  • Set hard caps on steps, time and spend

The one thing to remember

Cap the cost before it runs.

Common mistake: Writing a budget the system doesn’t enforce

A budget in the instructions is a request, and a stuck loop or a confused agent simply keeps going.

The fix: Set hard caps on steps, time and spend in the settings.

Key terms

Cost per run
What one run spends on the model and its tools.
Cost per result
A month’s cost divided by the results you used.
Hard cap
A limit the system enforces, which stops the run.

Part of AI Agent Builder (AX-300)

For people who run AI workflows: build an agent with the right tools, tests and guardrails, and approvals where it counts.

12 lessons, practice quizzes, a final exam and the Sophyx Certified AI Agent Builder – Professional certificate. Regular price USD 49.99. Your first certification is free. Free with any paid Sophyx plan.

Start the course free
Book a Demo