TokenPak

TokenPak is the open logistics layer for AI context.

Know how far your agent can go.

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.

Today
Request records and receipts, a session trip computer with forecasts shown only where calibrated, Spend Guard limits and explicit context tools.
Planned
Calibrated forecasts for more model and effort combinations, and Pro reroute recommendations once calibration evidence exists. Any automation comes later, and separately gated.

TokenPak doesn't replace your AI stack.

It adds the missing logistics layer: packing, routing, reusable context, guardrails, orchestration, and per-request records.

Six capabilities

Pack

Explicit context tools can reduce eligible content. The default proxy preserves conversation turns and can report zero tokens saved.

Route

Configure routing policies and inspect observe-mode records. Automatic model changes and fallback enforcement are not active by default.

Reuse

Use local vault recall and read-only Pak inspection. Broader Pak reuse is a separate capability with its own availability requirements.

Guard

Spend and safety guardrails run as a side-channel gatehouse across every request.

Dispatch

Inspect scoped workflows, routing decisions and a local run ledger. Packaged alpha with optional dependencies; live station execution and delivery receipts remain unfinished.

Receipt

Inspect locally recorded request receipts: observed usage and available cost attribution. Missing coverage remains visible; a receipt can truthfully report zero tokens saved.

How a request flows

The default path forwards conversation turns without shortening them. Explicit context tools and configured guards have separate roles.

Conceptual request flow — packing is optional; default conversation turns remain intact
  1. Raw context
  2. Packing Station
  3. Route
  4. Send
  5. Provider
  6. Receipt

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 and safety guardrails run as a side-channel overlay before Send.

Where TokenPak fits

TokenPak overlaps with tools you may already run — and adds a layer they don't. Run them together.

How it sits alongside gateways, observability tools, and MCP
Where it fits
  1. Your agent

    Claude Code

    Codex

  2. TokenPak (local)

    proxy · measure

    guard · record

  3. Your gateway

    LiteLLM /

    OpenRouter / …

  4. Model provider

    Anthropic · OpenAI

    Google Gemini

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.

Full comparison

Savings

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.

Open source & Pro

TokenPak's core is open source (Apache-2.0). Pro 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.

Pro is delivered as the tokenpak-paid package via a separate index.

Latest release

Release

TokenPak v1.30.1

v1.30.1 · Oct 1, 2026

latest

The Claude Code footer and the Codex pane showed only TokenPak instead of the session line when the user's locale collates regex ranges, for example en_US.UTF-8 on Linux. The footer's ASCII check now runs in byte order under any locale.

Documentation

starter

Getting Started

Set up TokenPak and inspect your first request receipt, including zero savings.

starter

Installation

pip install options, OS notes, troubleshooting install failures.

starter

Claude Code guide

Route Claude Code through TokenPak with one environment variable.

More at docs.tokenpak.ai.

Try it locally.

python -m pip install tokenpak && tokenpak setup — then point your AI client at the local proxy. No cloud component; credentials stay in your environment and provider flow.