# TokenOps

Run-aware token budget governance for multi-agent systems, enforcing a spending limit before every model call rather than reporting cost after the fact.

TokenOps sets a single token budget for an entire agent workflow and enforces it before every step, so spending on many small, individually cheap calls does not quietly add up to a large bill. Ten configurable policies ship by default, and more can be added.

It requires Python 3.10 or newer and a running control plane that tracks spend for one or more agent processes; a demo command launches a throwaway plane for trying it out. Integrating it means wrapping an existing model call once and passing the wrapped version to an agent instead of the original; the wrapper checks the budget before each call and raises a Halt error when the run is out of budget, even from another process.

A Claude Code integration command wires the enforcement point in automatically; other agents follow a documented manual integration of about ten lines.

Website: https://theagentplane.github.io
