Local-First AI Governance
Proxy & Spend Firewall

Intercept downstream LLM requests locally, estimate transaction costs before execution, enforce strict budget guardrails, and prevent runaway AI agent overspending.

$ npm install -g tokenwall
TokenWall Spend Analytics Dashboard
TokenWall CLI Interactive Approval
TokenWall VS Code companion extension modal dialog

Enforce Local Limits. Save API Credits.

Local-First Interception

100% private. Operates locally on your disk. Your prompts, keys, and source files never touch external clouds or TokenWall servers.

Spend Firewall

Uses SQLite-based transactional reservations to prevent simultaneous multi-step agent requests from bypassing budget quotas.

Interactive Approvals

Decoupled WebSockets resolve TTY locking conflicts. Approve costly calls from secondary terminal clients or workspace dashboards.

Runaway Loop Detector

Detects recursive debugging loops, repeating prompt footprints, and consecutive upstream provider failures before budget drain.

Context Optimizer

Identifies context bloat (oversized logs, lockfiles, node_modules) and compresses or truncates waste payload to save token billing.

Smart Model Routing

Classifies query complexity and suggests switching from premium expensive models (Opus/GPT-4) to cheaper ones (Haiku/Flash).

Interactive Spend Simulator

Configure the sliders to simulate a typical coding agent loop. Witness how TokenWall evaluates downstream request budgets and intervenes when thresholds are breached.

Interactions will display here if TokenWall flags the request.
tokenwall-simulator-session
npx tokenwall exec -- npx @anthropic-ai/claude-code
🤖 Claude Code initialized inside project workspace...
💬 Prompt: Fix spelling errors in the layout template
Ready to simulate. Adjust configurations on the left and click "Execute Agent Request".

Simple Integration

Get up and running locally in under 2 minutes. Fits right inside your current terminal workflow.

# Install packages and compile TypeScript
npm install
npm run build
# Start the proxy daemon server in background (runs on port 1984)
npx tokenwall start
# Run coding agent inside TokenWall session redirection
npx tokenwall exec -- npx @anthropic-ai/claude-code

Keep Coding, Safely.

Secure your local LLM requests against budget breaches and runaway recursive loops today.

Install Extension