Cap the spending of your agents logo

Cap the spending of your agents

Free
FreeFree tier
Type
Open Source

About Cap the spending of your agents

Capit is an open-source CLI tool for managing API key budgets per LLM agent and per provider, with cost capping to prevent runaway spending. It integrates with platforms like OpenRouter, AIHubMix, and Concentrate to create guardrails that enforce spending limits. Capit supports popular AI coding assistants including Claude Code, Cursor, Windsurf, Hermes, OpenClaw, and Opencode, and allows setting per-agent budgets as low or high as desired. Installation is via uv tool install capit, and usage is a single command (e.g., capit openrouter 5.00 --agent claude). All configuration is stored locally, with no data sent to external servers. Part of the DAY50 suite of open-source AI workflow tools.

Key Features

Budget per-agent, per-provider for LLM API costs
Supports multiple agents: Claude Code, Cursor, Windsurf, Hermes, OpenClaw, Opencode
Integrates with platforms: OpenRouter, AIHubMix, Concentrate
Creates guardrails that enforce hard spending caps via provider APIs
Local-only storage; no external servers or data transmission
Simple CLI usage with a single command
GUI mode via `capit serve` and TUI mode via `capit openrouter`
Extensible with custom agents and platforms (documented in README)
MIT licensed and free to use

Pros & Cons

Pros
  • Simple command-line interface; works with one command
  • Supports popular AI coding agents out of the box
  • Enforces hard caps via provider guardrails, not soft limits
  • Open source and free with MIT license
  • Local configuration ensures privacy and no vendor lock-in
  • Extensible to add custom agents and platforms
Cons
  • Requires a supported provider (OpenRouter, AIHubMix, or Concentrate) to enforce caps; not all LLM platforms support guardrails
  • Currently limited to six agents, though extensible
  • Users must have an account with the underlying provider to create capped keys

Best For

Preventing unexpected high inference bills from LLM agents stuck in unproductive loopsManaging budgets for multiple AI coding assistants in development workflowsGiving each AI agent a fixed spending limit to control costs across teams

FAQ

How does capit work?
Capit calls a supported platform's API (e.g., OpenRouter) to create a guardrail with a spending cap, generates an API key tied to that guardrail, and writes the key to the agent's configuration file. The cap is enforced by the platform, so the key cannot exceed the budget.
What agents are supported?
Capit supports Claude Code, Cursor, Windsurf, Hermes, OpenClaw, and Opencode. More agents can be added by following the instructions in the agents/README.md.
Does capit send my data to external servers?
No. All configuration and API keys are stored locally on your machine. There are no capit servers, and nothing is sent to the capit project.
Is capit free?
Yes, capit is open source under the MIT license and free to use. Installation is done via `uv tool install capit`.