Pack
Explicit context tools can reduce eligible content. The default proxy preserves conversation turns and can report zero tokens saved.
TokenPak is the open logistics layer for AI context.
TokenPak is a local proxy for coding agents that records each request and shows how far the session can go: measured usage, estimated cost, burn and runway.
It adds the missing logistics layer: packing, routing, reusable context, guardrails, orchestration, and per-request records.
Explicit context tools can reduce eligible content. The default proxy preserves conversation turns and can report zero tokens saved.
Configure routing policies and inspect observe-mode records. Automatic model changes and fallback enforcement are not active by default.
Use local vault recall and read-only Pak inspection. Broader Pak reuse is a separate capability with its own availability requirements.
Spend Guard checks each proxied request before it is sent and holds one that would exceed a limit. By default the limit is the model's context window; dollar and rolling session caps are opt-in.
Inspect scoped workflows, routing decisions and a local run ledger. Packaged alpha with optional dependencies; live station execution and delivery receipts remain unfinished.
Inspect locally recorded request receipts: observed usage and available cost attribution. Missing coverage remains visible; a receipt can truthfully report zero tokens saved.
The default path forwards conversation turns without shortening them. Explicit context tools and configured guards have separate roles.
Reuse feed: Today the companion path uses BM25 vault recall; the planned Pak reuse path feeds the Packing Station so context can be reused instead of rebuilt.
Gatehouse (Guard): Spend Guard limits are checked as a side-channel overlay before Send.
TokenPak overlaps with tools you may already run — and adds a layer they don't. Run them together.
Your agent
Claude Code
Codex
TokenPak (local)
proxy · measure
guard · record
Your gateway
LiteLLM (tested adapter)
or the gateway you already run
Model provider
Anthropic · OpenAI
Dispatch Center dashboard (preview) — orchestration for multi-step and multi-agent work, around the flow.
| Tool type | Overlaps on | TokenPak adds | Together? |
|---|---|---|---|
| Gateways / routers | routing | explicit context tools + local request records | Run both. |
| Observability tools | measurement | explicit context tools + local attribution records | Run both. |
| MCP-based workflows | ecosystem coordination | a semantic contract (TIP) for packing, routing, cost, telemetry | Composes. |
The default proxy preserves conversation turns and does not promise token savings. Explicit compression tools can reduce eligible content. Provider cache reuse is measured separately from product-attributed reduction; inspect your recorded usage and its coverage before drawing conclusions.
TokenPak's core is open source (Apache-2.0). Pro is a separate,
proprietary package (tokenpak-paid) for individual
developers. Its stay-versus-fresh session comparison is a preview: it
prepares context bundles for continuing in a fresh session, measures them
against observed references, and records your confirm or decline.
Planned: Pro reroute recommendations once calibration evidence exists. Any automation comes later, and separately gated.
There is no self-service purchase yet. To ask about access, write to hello@tokenpak.ai.
tokenpak update apply makes a staged or already installed update take effect. It restarts the TokenPak services, and it refuses, changing nothing and exiting with code 9, while a request is in flight or a client is connected. It takes two idle observations a short interval apart and checks again immediately before it stops anything. --check reports whether it would apply now without restarting anything. When no service manager is found it prints the exact manual step. tokenpak update now reports a pending update instead of downloading it again.
starter
Set up TokenPak and inspect your first request receipt, including zero savings.
starter
pip install options, OS notes, troubleshooting install failures.
starter
Route Claude Code through TokenPak with one environment variable.
More at docs.tokenpak.ai.
python -m pip install tokenpak && tokenpak setup --start — then point your AI client at the local proxy. No cloud component; credentials stay in your environment and provider flow.