Skip to content
@tokenpolice

TokenPolice

A firewall for your AI bill, plus the observability to aim it. It decides before each LLM call is made. Prompts never leave your servers

TokenPolice

Monitor every AI dollar. Control it in real time.

TokenPolice is an SDK that sits inside your app, in front of every LLM call. It prices the call before it is made and checks it against your rules — block this user after $5 a month, tell me when AI Search passes $100 a week, send free users to a cheaper model — then lets it through, reroutes it, or refuses it.

A few decisions you should know about before you install anything:

  • Dry-run is the default. Nothing is blocked until you say so. The first thing you see is a report of what a rule would have stopped, per user and per run, with the dollar amount.
  • Fail-open. If our service is down or slow, your call proceeds untouched. The firewall can fail; your app can't.
  • Not a proxy. It's OpenTelemetry instrumentation in your process. Token counts, cost, tags and a structural fingerprint per message (for loop detection) leave your server. Prompt and completion text never do — there is no field on the wire for it.

Install

npm install token-police        # Node 20+
pip install token-police        # Python 3.10+

Or let your coding agent do it and verify the integration from real traces:

claude plugin marketplace add tokenpolice/skills
claude plugin install tokenpolice@tokenpolice

Repositories

Repo What it is
token-police-node Node SDK (token-police on npm)
token-police-python Python SDK (token-police on PyPI)
token-police-langchain-node Optional LangChain companion for Node
skills Claude Code plugin + Agent Skill that installs and verifies the SDK

Links

Questions, bugs, or "it did nothing in my app": open an issue on the SDK repo or write to support@tokenpolice.ai.

Popular repositories Loading

  1. token-police-node token-police-node Public

    TokenPolice Node.js SDK

    TypeScript

  2. token-police-python token-police-python Public

    TokenPolice Python SDK

    Python

  3. token-police-langchain-node token-police-langchain-node Public

    LangChain companion for the TokenPolice Node.js SDK

    TypeScript

  4. skills skills Public

    TokenPolice skills for coding agents (Claude Code plugin marketplace + Agent Skills)

  5. .github .github Public

    Organization profile for TokenPolice

Repositories

Showing 5 of 5 repositories

Top languages

Loading…

Most used topics

Loading…