v1 — Budget Controls now available

Know what you're
spending on AI

Privacy-first cost tracking proxy for AI APIs. Set budgets, track spend across models, never get surprised. All data stays on your machine.

agentcost status
$ agentcost status
Budget: $4.23 / $10.00 (daily)
Requests today: 47
Top model: claude-sonnet-4 ($3.81)
Status: ● healthy42% of daily limit

Everything you need to control AI spend

🔒

Privacy-first

Runs entirely on your machine. No cloud, no telemetry, no tracking. Your prompts and costs stay yours.

📊

Multi-provider tracking

One proxy for OpenAI, Anthropic, and more. Unified cost tracking across all your AI usage.

Budget Controls

Pre-flight checks, soft/hard limits, model suggestions. Let your agents self-regulate their spend.

🎯

Per-request costs

Know exactly what each API call costs. Track by model, by day, by whatever you need.

🚦

Hard limits

Set daily or monthly limits. When you hit them, requests stop. No surprises on your bill.

🔧

Drop-in proxy

Point your SDK at localhost:8787. No code changes needed. Works with any OpenAI-compatible client.

Up and running in 60 seconds

01

Clone & install

Clone the repo and install globally.

git clone https://github.com/n1byn1kt/agentcost
cd agentcost && npm install && npm install -g .
02

Start the proxy

Run the agent. It starts a local proxy on port 8787.

agentcost agent
03

Point your apps

Set your base URL to localhost:8787. That's it.

export OPENAI_BASE_URL=http://localhost:8787/openai

Take control of your AI spend

Open source, self-hosted, and built for developers who want visibility into every API call.