proxy
View on GitHubLocal-first LLM proxy that meters what every agent run costs and kills runaways before they drain your budget. Free, MIT.
Local-first MIT proxy that sits between AI agents and model providers, pricing every request and rolling cost up per run, agent, and model. Adds budget caps, a kill switch, anomaly detection, complexity-based model routing, and cross-provider failover behind one Anthropic/OpenAI-compatible base URL.
Use Cases
Meter LLM spend per agent run and per agentKill runaway agent loops before they blow the budgetRoute simple requests to cheap models automaticallySet daily/hourly/per-run hard budget capsFailover across providers on 429/503/529Track Claude Code session costs with no SDK changesDetect token-explosion and repetition anomaliesLocal dashboard and terminal cost tickerTag costs by run, agent, and thread via headersCross-provider model remapping and retry
Built With
- Language
- TypeScript
- Frameworks
- Node.js · TypeScript · Vite · Vitest · better-sqlite3 · js-yaml · Anthropic API · OpenAI API
Tags
llm-proxy · cost-tracking · model-routing · observability · budget-caps · kill-switch · anomaly-detection · claude-code · local-first · llm-gateway · cost-attribution · failover · agent-ops · openai-compatible · anthropic-compatible · sqlite