OPEN-CORE ACTIVE AGENT GATEWAY • v0.1.0

Your coding agents are bleeding 90% of their prompt cache on every turn.

Passive LLM proxies watch your bill burn. CacheSurgeon operates in flight—sorting randomized tool schemas, relocating per-second timestamps, warming idle 5-minute TTL caches, vaulting leaked .env secrets, and blocking rogue rm -rf / DROP TABLE tool calls before execution.

pip install git+https://github.com/jsumpter415/cachesurgeon.git && cachesurgeon start
Prefix Cache Healed
0% → 98.7%
Local MLX Speedup
64× faster
Surgical Overhead
< 2 ms
LIVE SURGICAL TABLE — INSPECT REAL PAYLOAD HEALING CACHE MISS PREVENTED
RAW AGENT PAYLOAD (0% CACHE) hash: 9f41a02c

            
AFTER CACHESURGEON (96.4% CACHE) hash: 1cdfcd90

            

FIVE SURGICAL INTERVENTIONS IN < 2 MILLISECONDS

Why engineers outgrow passive LLM wrappers.

  1. 01

    Active Prefix-Cache Surgeon + Byte-Level X-Ray

    Go, Python, and JS agent harnesses serialize tool JSON maps in non-deterministic order and stamp per-second clocks into line 1 of the system prompt. CacheSurgeon sorts schemas deterministically, relocates volatile metadata to the trailing user turn, and injects Anthropic cache_control breakpoints automatically.

    MEASURED 40–87% token cost cut
  2. 02

    Net-Savings TTL Cache Warmer

    Anthropic's default 5-minute cache TTL punishes code reviews and coffee breaks: returning at minute 6 forces a full 1.25× cache rebuild. CacheSurgeon pings only when cold_rebuild_cost > 2× ping_cost and accounts for Gross Savings − Ping Spend transparently.

    ANTHROPIC 5M TTL 10× cheaper than rebuild
  3. 03

    Reversible Secret & PII Egress Vault

    When a coding agent runs printenv or reads .env, AWS keys, Stripe tokens, JWTs, PEM blocks, and database URLs are scrubbed into session-scoped opaque tokens (__CS_AWS_ACCESS_KEY_01__) before cloud egress—zero plaintext secrets ever touch third-party APIs or audit logs.

    ZERO PLAINTEXT 11+ secret/PII detectors
  4. 04

    In-Flight Tool-Call & MCP Execution Firewall

    Inspects model-emitted OpenAI tool_calls and Anthropic tool_use blocks before they execute on developer laptops or CI runners. Neutralizes rm -rf, DROP TABLE, curl | bash, force-pushes to main, and SSH key reads at the proxy boundary.

    PRE-EXECUTION CISO audit trail ready
  5. 05

    Semantic Loop Circuit Breaker & Safe Same-Family Failover

    Detects repeating failing edit → pytest death spirals (OWASP Denial of Wallet) and injects a root-cause Pivot Directive or trips a hard USD ceiling. On upstream 429 rate limits, safely downgrades within the same model family—or fails over to local Ollama only when explicitly enabled.

    OWASP LLM10 Hard $ session budget cap

FINOPS TELEMETRY SIMULATOR

Calculate your team's silent cache bleed.

Estimate what unhealed prompt caches and idle 5-minute TTL expirations cost your engineering org every year.

AIR-GAPPED ED25519 LICENSING • ZERO TOKEN MARKUP

Keep 100% of your savings. Pay flat, not per token.

Community $0 MIT Open-Source • Forever
  • Active Prefix-Cache Surgeon + X-Ray Diff
  • Anthropic cache_control injection
  • Basic Secret & PII redaction
  • Local Ollama MLX Turbo acceleration
  • Self-hosted Docker + SQLite Cockpit
Install Free CLI
Team / On-Prem $299 per month • up to 25 engineers
  • Everything in Pro
  • In-Flight Tool-Call & MCP Execution Firewall
  • Multi-workspace USD budgets & DLP rules
  • 100% air-gapped VPC / Docker verification
  • Priority engineering & custom model tables
Deploy On-Prem Docker

DROP-IN COMPATIBILITY • ONE ENV VAR

Prove the savings on your own agents in 30 seconds.

Works out-of-the-box with Codex, Claude Code, Cursor, Horizon Zero, OpenHands, and any OpenAI or Anthropic SDK. Zero vendor lock-in. Zero telemetry leaves your machine.

# 1. Install & launch CacheSurgeon locally (or via docker compose up -d)
pip install git+https://github.com/jsumpter415/cachesurgeon.git
cachesurgeon start --port 8787

# 2. Point your coding agent at CacheSurgeon
export OPENAI_BASE_URL="http://127.0.0.1:8787/v1"
export ANTHROPIC_BASE_URL="http://127.0.0.1:8787"

# 3. Inspect live savings & export an expense-ready CTO receipt
open http://127.0.0.1:8787
cachesurgeon receipt --out monthly-roi.html