A provider-agnostic Go core that cuts the tokens every request carries — losslessly, or lossy-but-reversibly — as an HTTP proxy or an in-process plugin. Same request in, a smaller request of the exact same shape out.
Point any agent at the proxy — one port serves both dialects.
context-guru-proxy --preset balanced # or --config cg.yaml
ANTHROPIC_BASE_URL=http://localhost:4000/anthropic
OPENAI_BASE_URL=http://localhost:4000/openai/v1
Any component error or panic reverts that component only. The original request is always a valid fallback.
A component that grows the request is reverted. Token cost is measured on message content, so you never pay to compact.
Every lossy drop leaves a <<cg:HASH>> marker and stashes the original — recoverable on demand.
Proxy / gateway, in-process AuthBridge plugin, or a bifrost LLMPlugin — one core, unchanged.
Lossless reformatters and reversible offloaders, ordered by config. Presets for coding, MCP, and long agent sessions.
Benchmarked on SWE-bench with Claude Code: real token savings, zero task-reward change.
The summarize config on the sample 11-message transcript — same shape, far fewer tokens.
SWE-bench · Claude Code · claude-sonnet-4-6 · 10 tasks × 13 configs.
mask mean token savings (resolved tasks)