CostCapFREE BETAHosted workspace

LOCAL SPEND CAP FOR AI AGENTS

Stop an agent's API spend at a cap you set.

CostCap wraps your agent process with a local metering proxy. Once the cap is reached, further provider calls are refused. No account or sign-in needed.

Install from source

The npm package is not published yet. Node 20 or newer. The CLI needs no npm install; the optional pg driver is used only by the hosted service.

git clone https://github.com/persooninc/costcap.git
cd costcap

Wrap your agent

node src/cli.js wrap --cap 5 --day-cap 10 --max-steps 40 -- node your-agent.js

--cap is USD per run, --day-cap and --month-cap are USD per UTC day and month, and --max-steps limits provider calls. Pause every agent sharing the kill file with node src/cli.js kill "reason", then node src/cli.js resume.

Enforcement limits

Full enforcement limits in the README · Offline policy proof and its limits