headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
- 80k
- Python
- Apache-2.0
- 19 h ago
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
What are the principles we can use to build LLM-powered software that is actually good enough to put in the hands of production customers?
Find the ghost tokens. Fix them. Survive compaction. Avoid context quality decay.
Symbol-level code retrieval for AI agents: fetch the function you need, not the whole file. Runs locally. 96.2% fewer tokens per lookup on average than grep-and-read on our 15-lookup benchmark. Works with Claude Code, Cursor, Codex and any MCP client. Free for non-commercial use; commercial use needs a one-time license.
The ripgrep of AI context: a zero-dependency C++23 CLI + MCP server for coding agents. Cut agent token costs by finding code without reading the repo, then keep large codebases off the complexity wall: blast radius, tests to run, quality deltas as you write. Every guess labelled, every loss published. Paddle out with a map.
LLM-supervised persistent memory for AI agents — graph-based recall, cross-session knowledge, single binary. Works with DeepSeek Harness, Claude Code, OpenClaw, and any agent runtime.
Context compression for AI coding agents: compresses tool output before it enters the model, dedups repeats to 13-token refs. Claude Code, Cursor, Codex, Kiro, Zed, any MCP client. Rust, zero LLM calls.
Give Claude Code photographic memory in ONE portable file. No database, no SQLite, no ChromaDB - just a single .mv2 file you can git commit, scp, or share. Native Rust core with sub-ms operations.
Cut AI context cost without trusting the compressor. Every reduction is reversible, byte-exact recoverable, and carries an auditable receipt. Local-first, works through proxy, MCP, SDK, or agent wrapper.
A Claude Code mod that puts a live agent dashboard in your terminal: context and cost, advisor timeline, every permission check, subagent cards and swimlanes.
VeritasGraph — open-source Knowledge Graph & GraphRAG framework on GitHub. Build multi-hop reasoning, ontology-aware retrieval, and verifiable attribution over your own data. Nodes, edges, RDF, linked-data — runs locally or in the cloud.
Posthorse: fresh context, same journey. No-summary context rollover for the Pi coding agent (official Pi 1.0+ or the fitchmultz/pi fork), with durable notes and history recovery.
Code intelligence for agents: find the code that matters and keep your context window and tokens lean.
tokendoctor: the same Claude Code for up to 38% less. Replays your own past sessions to show what each change would have saved, then changes only what you pick
Find out where your coding agent starts degrading. Personal context-rot analytics from your own sessions - 100% local, zero-config: uvx contextrot
A curated list of strategies, tools, papers, and resources for reducing LLM token costs and improving efficiency in production.
A discovery and compression tool for your Python codebase. Creates a knowledge graph for a LLM context window, efficiently outlining your project | Code structure visualization | LLM Context Window Efficiency | Static analysis for AI | Large Language Model tooling #LLM #AI #Python #CodeAnalysis #ContextWindow #DeveloperTools
dsh-sieve: context engineering & token optimization plugin for DeepSeek Harness (DSH) — tool output filtering, context pruning, progressive skill disclosure. 36% smaller payload in offline replay. DSH 上下文管理与 token 优化节省插件。
Context usage, model quotas, token breakdowns, and generation metrics — right in your Antigravity composer.
Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.
Make every Claude token count. rightsize picks the right model and effort for each prompt, while keeping cache and context costs low. It learns how you work and gets better over time.
Deterministic AST Context Compressor & MCP Server for Cursor, Claude & Local LLMs. Cuts prompt tokens by 85–95% with 100% Zero-Leak security.
[ICLR 2025] Official code repository for "TULIP: Token-length Upgraded CLIP"
Claude Code mod: context in tokens, 5-hour and weekly limits vs. the clock, prompt cache countdown, session cost and running agents, in one band above the prompt.
🌿 Prune your AI agent's context window. Reduce token usage by 70-95% with hierarchical memory. Replace flat MEMORY.md with a bonsai-shaped domain tree. Progressive disclosure, zero dependencies. Works with OpenClaw and any LLM agent framework.
Claude Code harness and alternative to context compaction: at 80% context it writes a verified capsule, runs /clear and resumes with persistent memory in git. Long-running and multi-agent Claude Code sessions, auto clear instead of auto-compact. MIT, local, Node 18+. Codex adapter.
Terminal-style input history for the DeepSeek Harness web composer: edge-first arrows with exact draft/caret restore, browser-local persisted history, Ctrl+R reverse search, workspace recall - and sliding-context awareness (compaction summaries in recall/search, compaction notice with one-click /compact fill).
A pure-Python, zero-dependency memory decay engine for AI agent context — implements Ebbinghaus forgetting-curve retention with usage-based reinforcement, benchmarked against naive recency-window pruning.
Context window auto-management for DeepSeek Harness: lossless zero-model rollover, budget reminders, notes.
Persistent memory for Claude Code. Survives compaction and session boundaries: anti-patch reconcile-on-write with LLM-judged de-duplication, a forced PROGRESS.md handoff, a live PLAN.md anchor with an enforced directive ledger, FTS5 search, MCP tools and a GUI. Pure stdlib Python, zero runtime dependencies.
Mods for Claude Code: plugins that add live panes, status lines and guards to its terminal UI
🧭 Keep AGENTS.md lean. Route coding agents to task-specific docs with byte budgets and integrity checks.
An OpenCode 2.0 plugin that bounds a session's context window with an explicit, structured execution state (Σ) instead of an append-only conversation history.