Spaces:
Build error
Build error
File size: 2,651 Bytes
175746c d724f14 175746c d724f14 bb04104 aaaca9f bb04104 d724f14 31aa72c 8455c4a d724f14 3ac2620 d724f14 175746c d724f14 31aa72c d724f14 175746c d724f14 175746c d724f14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | # Headroom Documentation
Welcome to the Headroom documentation.
## Getting Started
| Guide | Description |
|-------|-------------|
| [Quickstart](quickstart.md) | 5-minute setup |
| [SDK Guide](sdk.md) | Python SDK usage |
| [Proxy Guide](proxy.md) | Proxy server deployment |
## Framework Integrations
| Framework | Description |
|-----------|-------------|
| [LangChain](langchain.md) | Chat models, memory, retrievers, agents, streaming |
| [Agno](agno.md) | Model wrapper, hooks, multi-provider support |
| MCP | See [CCR Guide](ccr.md) for tool compression |
## Core Concepts
| Topic | Description |
|-------|-------------|
| [Universal Compression](compression.md) | ML-based content detection + structure preservation |
| [Image Compression](image-compression.md) | 40-90% token reduction for images via trained ML router |
| [Transforms](transforms.md) | How compression works |
| [CCR](ccr.md) | Reversible compression architecture |
| [Configuration](configuration.md) | All configuration options |
## Advanced
| Topic | Description |
|-------|-------------|
| [Text Compression](text-compression.md) | Opt-in utilities for search/logs |
| [LLMLingua](llmlingua.md) | ML-based compression |
| [Metrics](metrics.md) | Monitoring and observability |
| [Errors](errors.md) | Error handling |
## Deployment & Operations
| Guide | Description |
|-------|-------------|
| [macOS Deployment](macos-deployment.md) | Run proxy as background service on macOS |
## Reference
| Topic | Description |
|-------|-------------|
| [API Reference](api.md) | Complete API docs |
| [Architecture](ARCHITECTURE.md) | Internal design |
| [Troubleshooting](troubleshooting.md) | Common issues |
## Overview
Headroom is the Context Optimization Layer for LLM applications. It reduces your LLM costs by 50-90% through intelligent context compression.
### How It Works
1. **Universal Compression** — ML-based content detection with structure-preserving compression
2. **SmartCrusher** — Compresses JSON tool outputs, keeping errors, anomalies, and relevant items
3. **CacheAligner** — Stabilizes message prefixes so provider caching works
4. **RollingWindow** — Manages context limits without breaking tool call pairs
5. **CCR** — Caches original data so compression is reversible
### Safety Guarantees
- Never removes human content
- Never breaks tool call ordering
- Parse failures pass through unchanged
- LLM can always retrieve original data
### Getting Help
- [GitHub Issues](https://github.com/chopratejas/headroom/issues) — Bug reports
- [GitHub Discussions](https://github.com/chopratejas/headroom/discussions) — Questions
|