Skip to content
Token Controller Docs
Docs / Start / Overview

Overview

When your team works with AI agents, you may need to explain the AI bill: what each bill paid for, which project or client the work was for, and whether the bill matches what your agents used. Token Controller collects every model call your agents make as a message, prices it with a price table, and lets you check each bill against the messages under the same contract. You can start small, with only messages and one bill, and add tags, plans and approval later.

How the pieces fit

Usage, tags and bills each come from their own sources, in any order. Tags go on messages and on bills afterwards, and the contract tag lets a bill be checked against its own messages. Every figure is computed from your organization's log, as of a date.

Usage sourcescollectors send tousage endpointsMessagetokens by kindsignalsCosttokens × priceper kindReportscost by any tagTag sourcesJira · CRM · listby handTagsproject · featureclient · contractPrice tableours, or thecontract's ownBill sourcesbilling APIsCSV uploadBillamount · datesThe checkbill = messages+ unexplainedrulescontract
Source What it brings Where it comes from
Usage Messages: one per model call, with person, agent, model, time and tokens by kind. Everything else that came along is kept as a signal. A collector sends to a usage endpoint: telemetry from the agent itself, the Claude Code mod or the CLI on a person's machine, the GitHub Action in CI, or the token entries endpoint from any agent.
Tags What the work was for: project, feature, client, contract, or a name of your own. Jira, a list, or typed by hand. Rules put them on messages from their signals.
Bills What a provider charged under one contract for a date range. Anthropic and OpenAI admin APIs, a CSV upload, typed in, or the API.

How it works builds this picture step by step with one worked month, and every term is in the glossary.

Quick start for people managers

About fifteen minutes, once. To connect a bill you need an admin key from Anthropic or OpenAI, or the bill as CSV. A seat plan's bill can be typed in.

  1. Create the organization.

    Sign up at app.tokencontroller.com/signup. See Organization settings.

  2. Look at the price table.

    The price table is built in, with prices for thousands of models. You can add rows for prices you negotiated, for every contract or for one. See Price table.

  3. Bring in the bills.

    Under Bills, connect an Anthropic Enterprise Analytics key, a Console admin key or an OpenAI admin key, upload a CSV, or add a bill by hand. Each bill creates its contract, so there is nothing to set up first. See Bills.

  4. Create your tag values.

    Under Tags, create projects with their client, connect Jira if features live there, and add rules such as "key ^KD-\d+ in the branch is that feature" and "repository kestrel/shop is project Shop". See Tags and Rules.

  5. Invite people.

    Give each person their attributes, such as team: web, and a role. They install the mod or the CLI (below), or you cover everyone on Claude Code at once with telemetry push. See Attributes and Grants and roles.

  6. Move the cutoff.

    When the bills of a date range are checked and the submissions you want are in, you may move the cutoff to its last day. Figures up to it are frozen. See Cutoff.

Quick start for agent managers

Your sessions become messages as you work, and your organization's rules put them on features and projects. You look them over, fix what a rule got wrong, and submit.

The overview an agent manager sees: own cost this month, on features, to check, and the plan

Install the CLI

# macOS and Linux
brew tap tokencontroller/tap https://github.com/tokencontroller/tokencontroller
brew install tc
# Windows: tc-x86_64-pc-windows-msvc.zip from the GitHub releases
# connect with your invite link, or skip this to stay local
tc connect https://app.tokencontroller.com/i/kestrel-4f2a

More on the CLI page.

Add the Claude Code mod

# inside Claude Code
/plugin marketplace add tokencontroller/tokencontroller
/plugin install token-controller

After every turn the mod hands the session to tc, which reads its messages and splits it by your rules. The mod writes a one-line summary, and a band above the prompt shows what you spent and how much is on features. See Claude Code mod.

Check and submit

tc review # your sessions and where they were put
tc tag 5 feature=KD-231 # fix one that a rule got wrong
tc submit # submit everything since your last submit

See Check and submit.

Telemetry instead of an install

If your administrator pushes telemetry, your messages are counted without any install, and rules can put them on projects by repository. The mod or the CLI add the branch, the pull request and the summary, so cost can land on features.

Quick start for the API

Everything the web app does is a call to the HTTP API. Create a service token under Settings and report a session from any agent:

POST https://app.tokencontroller.com/api/v1/token-entries
Authorization: Bearer tc_svc_…
{
"agent_harness": "support-desk",
"provider": "anthropic",
"model": "claude-sonnet-5",
"started_at": "2026-03-04T09:12:00Z",
"ended_at": "2026-03-04T09:14:10Z",
"tokens": { "input": 4120, "output": 610, "cache_read": 18200 },
"feature": "KD-1"
}

The answer carries the session's cost from the price table. A read token reads every report and feeds the MCP server; POST /estimates says what described work may cost before it starts.

Quick start for self-hosters

  1. Start Postgres and the service.

    One Docker image and one Postgres database. See Self-hosting.

  2. Set your public URL, email and price table.

    The price table is built in; bring a file only for prices of your own. See Configuration.

  3. Point the tools at it.

    tc connect https://tc.example.com, and telemetry at https://tc.example.com/api/v1/ingest/otlp. Then follow the quick start for people managers.

Last updated 27 November 2026 · Edit this page© 2026 Jan Beck · Privacy · Imprint