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.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
docs: add OpenClaw plugin to README, integration guide, index, and TS SDK docs
chopratejas95f9e7a3e027
diff --git a/README.md b/README.mdindex 004dd32e7..c3392417a 100644--- a/README.md+++ b/README.md@@ -7,7 +7,7 @@Every tool call, DB query, file read, and RAG retrieval your agent makes is 70-95% boilerplate.<br>Headroom compresses it away before it hits the model.<br><br>Works with <b>any agent</b> — coding agents (Claude Code, Codex, Cursor, Aider), custom agents<br>- (LangChain, LangGraph, Agno, Strands), or your own Python and TypeScript code.+ (LangChain, LangGraph, Agno, Strands, OpenClaw), or your own Python and TypeScript code.</p></p>@@ -164,6 +164,7 @@ Gives your AI tool three MCP tools: `headroom_compress`, `headroom_retrieve`, `h| **Any Python proxy** | ASGI Middleware | `app.add_middleware(CompressionMiddleware)` || **Agno agents** | Wrap model | `HeadroomAgnoModel(your_model)` || **LangChain** | Wrap model | `HeadroomChatModel(your_llm)` |+| **OpenClaw** | ContextEngine plugin | `openclaw plugins install headroom-openclaw` || **Claude Code** | Wrap | `headroom wrap claude` || **Codex / Aider** | Wrap | `headroom wrap codex` or `headroom wrap aider` |diff --git a/docs/index.md b/docs/index.mdindex 5096f2017..0a788734b 100644--- a/docs/index.md+++ b/docs/index.md@@ -208,6 +208,20 @@ npm install headroom-ai</div>+<div class="grid-item" markdown>++### OpenClaw++ContextEngine plugin for OpenClaw agents. Auto-compresses context in `assemble()`.++```bash+openclaw plugins install headroom-openclaw+```++[OpenClaw Plugin →](https://github.com/chopratejas/headroom/tree/main/plugins/openclaw)++</div>+</div>[All integration patterns →](integration-guide.md){ .md-button }diff --git a/docs/integration-guide.md b/docs/integration-guide.mdindex 011383795..ab85df0aa 100644--- a/docs/integration-guide.md+++ b/docs/integration-guide.md@@ -265,6 +265,26 @@ See the [TypeScript SDK Guide](typescript-sdk.md) for full documentation includi---+## OpenClaw++Context compression plugin for [OpenClaw](https://github.com/openclaw/openclaw) agents.++```bash+pip install "headroom-ai[proxy]"+openclaw plugins install headroom-openclaw+```++Configure as context engine:+```json+{ "plugins": { "slots": { "contextEngine": "headroom" } } }+```++The plugin auto-detects a running Headroom proxy or starts one. Compression happens in `assemble()` — zero changes to the agent's behavior.++See the [OpenClaw plugin documentation](https://github.com/chopratejas/headroom/tree/main/plugins/openclaw) for full setup.++---+## Compression Hooks (Advanced)Customize compression behavior without modifying Headroom's code:diff --git a/docs/typescript-sdk.md b/docs/typescript-sdk.mdindex c72bb65e3..ebd3ed180 100644--- a/docs/typescript-sdk.md+++ b/docs/typescript-sdk.md@@ -198,6 +198,10 @@ By default, `compress()` never blocks your app. If the proxy is unreachable:The `headroom-ai` package has no runtime dependencies. Framework SDKs (Vercel AI, OpenAI, Anthropic) are optional peer dependencies — only install what you use.+## OpenClaw Plugin++The TypeScript SDK powers the [`headroom-openclaw`](https://www.npmjs.com/package/headroom-openclaw) plugin for [OpenClaw](https://github.com/openclaw/openclaw) agents. The plugin uses `HeadroomClient` internally to compress context during the `assemble()` lifecycle hook. Install it with `openclaw plugins install headroom-openclaw`. See the [plugin source](https://github.com/chopratejas/headroom/tree/main/plugins/openclaw) for details.+## Comparison with Python SDK| Feature | Python SDK | TypeScript SDK |