Step, Token, Time and Dollar Budgets
In this article
- Track one agent run against four limits at once (steps, tokens, working time and dollars) and work out what is left after each step.
- Decide whether a proposed next action fits what is left after a reserve for the final reply, and say what the run does when it does not.
- Derive the budget of a child run from what the parent has left, with the parent's deadline passed down.
- Tell a retry that costs a step from one that only costs time, tokens and money.
- Terms defined here: run budget, deadline propagation.
Overview
An agent run has a cap on steps, and that cap stops a loop that goes on forever. It does not stop a run that takes few steps but spends a minute on each, or one that starts a helper which spends money of its own. A real run needs four limits at once: how many steps, how much text the model reads and writes, how much time, and how many dollars.
After this you can read a half-finished run, work out what is left in each of the four, and decide whether the next action fits. You will also see how to hand a smaller budget to a helper run, and which retries cost a step.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Four meters on one run
- Reading the table
- The next action decides
- Budgets for a child run
- The check before each action
- Retries and waiting
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions