← Table of Contents · Page 89 of 868
THE ANATOMY OF A PRODUCTION HARNESS (COMPONENT MAP)
Part 8 of 14
THE BUDGET TRACKER
The budget tracker is the component that watches time, money, and token spend.
A budget is a limit on how much of a resource a run may use.
Three resources matter most.
Money matters because calling a model costs real currency, charged according to how many tokens are processed.
Time matters because a user will not wait forever, and because a runaway agent can tie up equipment.
Tokens matter because the context window and the cost are both measured in them.
The budget tracker keeps a running total as the loop goes round, compares it against the limits, and tells the loop to stop when a limit is reached.
A sensible tracker does not simply cut off the agent without warning.
It can raise a warning when most of the budget is gone, and when the limit is hit it can arrange for the agent to produce a partial report rather than nothing.
Everyday life offers a familiar parallel in a household budget, or in a prepaid phone plan that warns you before the minutes run out.
Part Six, Chapter 25, covers budgets and resource limits in detail.
Advertisement
Read Aloud:
0:00 / 0:00