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.

install# 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:

setup# 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.

Verify it's live. Run 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:

Compress
YSCompress shrinks repetitive context before it's sent
Route
Yellowstone plans local-vs-Claude and the cheapest path
Measure
Tokens, cost, and savings recorded per 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.

Student drafts
local model answers first — no Claude tokens spent
Verify
deterministic checks → sandbox tests → independent judge
Escalate
Claude corrects only when the draft falls short

Run it three ways — all reach the same loop:

terminal# 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
claude code panel# 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.
Why it's safe. A wrong local answer is worse than escalating, so the verifier is deliberately strict — deterministic checks, an optional sandboxed test run, and an independent judge all gate the student's draft before it's accepted. Claude stays the teacher and the safety net throughout.

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:

student setup# 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:

custom endpointdecompute student endpoint --base-url http://127.0.0.1:11434/v1 --model qwen2.5-coder
Local-first by design. The student endpoint is validated against SSRF and only reaches the host you configure. Drafting happens entirely on-device — no prompt leaves your machine until (and unless) the task escalates to Claude.

05 — FEATURESVS Code extension

Install the extension, then drive the whole loop from the command palette (⌘⇧P) — no terminal required.

install# 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.

openclaw# 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.

Streaming-safe. The gateway emits the canonical Anthropic SSE event sequence, so harness parsers that depend on 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:

privacy# 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:

telemetrydecompute 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.

licensedecompute 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.

decompute init
Connect Claude (BYOK key or subscription) and configure the gateway.
decompute status
Health summary — gateway, auth, and local student.
decompute doctor
Diagnose connectivity, PATH, and configuration problems.
decompute dashboard
Open the live savings & usage dashboard.
decompute usage
Token, cost, and savings ledger from the terminal.
decompute ts-run "…"
Run a task through the local student–teacher loop.
decompute local-chat "…"
Draft with the local student only (no escalation).
decompute student models
Pick and download a local student model.
decompute activate <key>
Activate a Pro license offline.
decompute telemetry off
Opt out of the aggregate analytics beacon.
decompute vscode
Install / repair the VS Code extension.
decompute upgrade
Update the CLI and gateway in place.

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.

mcp# 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.