Agent Economics
Cost metering, budget monitoring, model routing and chargeback for multi-agent systems.
Status, in the repository's words: Released: versioned releases (semver), listed in the changelog.
What it is
Tracks what your agents cost and reports that spend against budgets.
Recommends the most cost-effective model tier for a task.
It is a TypeScript service backed by Postgres and Redis, with a dashboard.
It reports only: the service does not send Slack or email notifications, throttle or block agents, or compute ROI.
What it does today
- Records a cost event for each request (tokens multiplied by model pricing) in a cost ledger.
- Supports a monthly spend cap per project, compared with the month's spend after each cost event.
- Reports budget threshold crossings as WebSocket budget_update messages and as audit events.
- Recommends a model tier for a task by capability and cost. The recommendation is advisory.
- Produces chargeback reports as JSON or CSV, per project, agent, department or organization.
- Flags a cost event that is a multiple of the agent's rolling baseline.
- Returns daily cost history with a 14-day projection.
- An optional JSON pricing table lets you change prices and add your own model tiers.
- The router knows 13 built-in model tiers.
- Every route except the health check requires a JWT bearer token.
What it ships
- An API service with REST endpoints and a WebSocket stream.
- A dashboard: a Vite/React UI over the metrics.
- A migrations Docker target that runs the SQL migrations.
- An api Docker target that runs the API server on port 8097.
- A dashboard image that serves the UI with nginx as a non-root user.
- An optional audit forwarder that sends audit events to an audit-ingest receiver. It is off by default.
What it needs
- Node.js 22 or newer.
- PostgreSQL, which holds the authoritative cost ledger.
- Redis, for live counters and for the WebSocket stream.
- A JWT signing secret. Without it the API fails closed.
- No native build toolchain is needed.
Install
Copied from the repository's README. This site has not run these commands.
npm install cp .env.example .env # then edit: DATABASE_URL, REDIS_URL, ECONOMICS_JWT_SECRET npm run build # compile TypeScript node --env-file=.env dist/run-migrations.js # apply SQL migrations node --env-file=.env dist/api/server.js # API on ECONOMICS_PORT (default 8097)
Limits and known issues, as the repository lists them
As listed on branch main of BulletproofSoftwareAI/bulletproof-agent-economics on 2026-11-30, commit 7c7020b: newer than the version described above.
- The API and its WebSocket speak plain HTTP; the server has no TLS of its own.
- Budget monitoring is advisory: no call is blocked, throttled or downgraded.
- Not implemented in the service: sending alerts by Slack, email or webhook. That code exists only as a library the API never runs.
- Not implemented in the service: per-feature ROI, per-agent caps, budget inheritance, and budget periods other than monthly.
- Not implemented in the service: automatic downgrade to a cheaper model tier, and the token-optimizer caches.
- Some of the built-in model prices carry no source or date.
Works with
Documents in the repository
Where each statement on this page comes from
Read from BulletproofSoftwareAI/bulletproof-agent-economics, branch main, commit cc5bf48; the limits and known issues from BulletproofSoftwareAI/bulletproof-agent-economics, branch main, commit 7c7020b, read on 2026-11-30. File and line for each statement:
- Cost metering, budget monitoring, model routing and chargeback for multi-agent systems.
README.md:3 - Released: versioned releases (semver), listed in the changelog.
README.md:74 - 1.1.6
package.json:3 - 2026-11-14
CHANGELOG.md:7 - Apache-2.0
README.md:116 - Tracks what your agents cost and reports that spend against budgets.
README.md:9 - Recommends the most cost-effective model tier for a task.
README.md:10 - It is a TypeScript service backed by Postgres and Redis, with a dashboard.
README.md:12 - It reports only: the service does not send Slack or email notifications, throttle or block agents, or compute ROI.
README.md:7 - Records a cost event for each request (tokens multiplied by model pricing) in a cost ledger.
README.md:16 - Supports a monthly spend cap per project, compared with the month's spend after each cost event.
README.md:18 - Reports budget threshold crossings as WebSocket budget_update messages and as audit events.
README.md:20 - Recommends a model tier for a task by capability and cost. The recommendation is advisory.
README.md:22 - Produces chargeback reports as JSON or CSV, per project, agent, department or organization.
README.md:24 - Flags a cost event that is a multiple of the agent's rolling baseline.
README.md:26 - Returns daily cost history with a 14-day projection.
docs/HOW-TO-USE.md:72 - An optional JSON pricing table lets you change prices and add your own model tiers.
README.md:69 - The router knows 13 built-in model tiers.
docs/OVERVIEW.md:64 - Every route except the health check requires a JWT bearer token.
docs/HOW-TO-USE.md:4 - An API service with REST endpoints and a WebSocket stream.
docs/OVERVIEW.md:9 - A dashboard: a Vite/React UI over the metrics.
README.md:28 - A migrations Docker target that runs the SQL migrations.
docs/INSTALL.md:78 - An api Docker target that runs the API server on port 8097.
docs/INSTALL.md:79 - A dashboard image that serves the UI with nginx as a non-root user.
docs/INSTALL.md:95 - An optional audit forwarder that sends audit events to an audit-ingest receiver. It is off by default.
README.md:70 - Node.js 22 or newer.
docs/INSTALL.md:5 - PostgreSQL, which holds the authoritative cost ledger.
docs/INSTALL.md:6 - Redis, for live counters and for the WebSocket stream.
docs/INSTALL.md:7 - A JWT signing secret. Without it the API fails closed.
README.md:67 - No native build toolchain is needed.
docs/INSTALL.md:8 - The API and its WebSocket speak plain HTTP; the server has no TLS of its own.
docs/ADMINISTRATOR.md:58 at 7c7020b - Budget monitoring is advisory: no call is blocked, throttled or downgraded.
README.md:21 at 7c7020b - Not implemented in the service: sending alerts by Slack, email or webhook. That code exists only as a library the API never runs.
README.md:31 at 7c7020b - Not implemented in the service: per-feature ROI, per-agent caps, budget inheritance, and budget periods other than monthly.
docs/OVERVIEW.md:24 at 7c7020b - Not implemented in the service: automatic downgrade to a cheaper model tier, and the token-optimizer caches.
docs/OVERVIEW.md:25 at 7c7020b - Some of the built-in model prices carry no source or date.
docs/ADMINISTRATOR.md:331 at 7c7020b - Optionally sends a cost.recorded event to an event router after each cost event.
README.md:71 - The README lists the metrics engine as a project it pairs with; it also runs standalone.
README.md:80 - Install section of the README
README.md:40
Bulletproof suite v1.0.0 pins tag v1.1.6, commit cc5bf48, tagged 2026-11-14. The installer has no build file for it at v1.0.0, so the release images do not carry it.