Documentation
Run Claude through a layer you control.
Decompute sits between your tools and Claude: it compresses context, plans routes, measures every token saved — and now drafts work on a local student model first, escalating to Claude only when it needs to. This is everything that ships today.
01 — GET STARTEDQuickstart
One script installs the CLI and the local gateway, registers it as a background service, and puts decompute on your PATH. macOS and Linux today.
# 1 · install the CLI + gateway (starts a local service on :8080)
curl -fsSL https://claude.decompute.run/install.sh | bash
Then connect your Claude account and point your coding agent at the gateway:
# 2 · connect Claude — works with a BYOK API key OR a Claude Pro/Max subscription
decompute init
# 3 · route Claude Code (or any Anthropic client) through the gateway
export ANTHROPIC_BASE_URL=http://127.0.0.1:8080
claude
That's it. Every Claude call now flows through the gateway, gets compressed and measured, and shows up in your dashboard.
decompute status for a health summary, or open http://127.0.0.1:8080/dashboard to watch the savings ledger fill in.02 — GET STARTEDThe gateway
The gateway is a local proxy that speaks both the Anthropic Messages API (/v1/messages) and the OpenAI chat API (/v1/chat/completions), so Claude-native tools and OpenAI-style SDKs both work unchanged. Three things happen on every request:
Useful endpoints and commands:
/dashboard— live savings, routes, and usage by client & project.decompute usage— the same ledger from the terminal.decompute doctor— diagnose connectivity, auth, and the local student.
03 — FEATURESThe /student teacher–student loop
The headline of this release. A small student model running locally on your machine takes the first pass at a coding task. Claude — the teacher — verifies the draft and only rewrites it if it's wrong or the task is genuinely too hard. Easy work stays local and free; hard work still gets Claude-quality answers.
Run it three ways — all reach the same loop:
# from the CLI
decompute ts-run "write a prime sieve in Python"
# --require-teacher forces a Claude review even when the student looks confident
decompute ts-run "parse this RFC-3339 timestamp" --require-teacher
# type the slash command inside the Claude Code panel
/student write a prime sieve in Python
Inside Claude Code, /student runs on your own Claude subscription — the local model drafts, and your Claude session verifies and escalates at no extra cost. Each answer is tagged so you always know what happened:
- ✓ handled locally by the student model — the draft passed verification; Claude wasn't needed.
- ↑ escalated to Claude — the draft fell short, so Claude solved it properly.
04 — FEATURESLocal student setup
The student runs through an OpenAI-compatible endpoint — by default a local llama.cpp server hosting a small coder model. An interactive wizard picks a model for your hardware and downloads it:
# pick + download a local coder model (sized to your machine)
decompute student models
# start / check the local student + judge
decompute student start
decompute ts-health
Already running your own inference server? Point the student at any OpenAI-compatible endpoint instead of the bundled one:
decompute student endpoint --base-url http://127.0.0.1:11434/v1 --model qwen2.5-coder
05 — FEATURESVS Code extension
Install the extension, then drive the whole loop from the command palette (⌘⇧P) — no terminal required.
# from the CLI…
decompute vscode
# …or search "Decompute" in the VS Code Marketplace
- Decompute: Ask Local Student — prompt for a task and run it through the verified student–teacher loop.
- Decompute: Solve Selection with Teacher–Student — send the highlighted code/selection straight into the loop.
- Decompute: Set Up Local Student — launch the model wizard from inside the editor.
Multi-line selections are passed safely to the runner, and the answer streams into an integrated terminal with its route and verifier line shown.
06 — FEATURESOpenClaw & other clients
Because the gateway speaks the Anthropic Messages protocol natively, agent harnesses like OpenClaw work with zero protocol shims — point them at the gateway and they're routed, compressed, and measured like any other client.
# point any Anthropic-compatible client at the gateway
export ANTHROPIC_BASE_URL=http://127.0.0.1:8080
export ANTHROPIC_API_KEY=dc_your_project_key # sent on x-api-key; hosted/team keys work too
Traffic is tagged by client (openclaw, claude_code, …) so the dashboard splits savings by harness. The same applies to count-tokens and model-discovery calls — the full agentic surface is supported.
message_start through message_stop work without modification.07 — OPERATEPrivacy & governance
The gateway runs on your machine and is built to keep sensitive data in-bounds. Two redaction modes are on by default and configurable:
# tokenize PII and redact secrets before anything is sent upstream
decompute config-set privacy.pii_mode tokenize
decompute config-set privacy.secret_mode redact
Decompute issues no API key of its own — you bring your Claude key (or subscription), and credential files are written owner-only and atomically. An optional weekly beacon reports aggregate, anonymized usage only (no prompts, no code); it's opt-out:
decompute telemetry off # disable the aggregate analytics beacon
08 — OPERATELicensing & Pro
Pro entitlements are activated with a signed offline license — verified locally against an Ed25519 public key, so activation works without phoning home. Each install has a stable, privacy-preserving device id (a random UUID, never a hardware fingerprint) that is the licensing unit.
decompute activate DCMP-XXXX-XXXX-XXXX # offline, signature-verified
decompute license # show tier + entitlements
decompute limits # current quota usage
See Decompute Pro for tier details and team plans.
09 — OPERATECLI reference
The most-used commands. Run decompute --help for the full list and per-command flags.
10 — OPERATEMCP server
Decompute ships an optional stdio MCP server that exposes the local student as a tool any MCP-capable client (Claude Desktop, IDE agents) can call.
# install with the optional extra, then run the stdio server
pip install "decompute-ai[mcp]"
decompute-mcp
Register decompute-mcp as an MCP server in your client and the student loop becomes a callable tool alongside your other MCP integrations.
Start saving on your own traffic
Install once, route Claude through the gateway, and watch the ledger.