Perceive
See what matters before you act.
Read moreThe definition
LeanCTX (short for Lean Context) is the context engineering layer for AI agents: it decides what agents read, compresses what they send, remembers what they learn, guards what they touch, and proves what they save — so what crosses the model boundary is intentional, compressed, and provable.
The one-paragraph definition
LeanCTX (short for Lean Context) is the open-source context engineering layer for AI agents. One local Rust binary decides what agents read (10 read modes, 60–90% fewer tokens, ~13-token cached re-reads), remembers what they learn (persistent sessions, knowledge graph), guards what they touch (PathJail, secret redaction, budgets, injection detection), proves what they save (Ed25519-signed ledger, reproducible benchmark) and replays what they saw (git-anchored, signed context snapshots you can restore or share); an optional local proxy compresses what they send — every request’s system prompt, history and tool output, prompt-cache-safe on the wire. Compression — read-side and wire-side — is one of five subsystems, and every original stays locally retrievable. Works with 30+ AI coding tools via MCP and shell hooks; embeds in any agent via a versioned /v1 API with Python, TypeScript and Rust SDKs. Local use is free forever, enforced by CI.
It's not about tokens. It's about what matters.
The name
Lean Context. The name describes the job: lean, precise context for AI agents instead of raw, noisy input.
Not "Lean Cortex", a misspelling that appeared in early press coverage. If you are writing about the project, the press kit has copy-ready boilerplate.
The four jobs
Four things change the moment LeanCTX becomes your context engineering layer.
60–90% less per readre-reads cost ~13 tokensPathJail · redaction · budgetsEd25519-signed ledgergit-anchored, signed snapshotsToken savings are the receipt. Context engineering is the product.
Under the hood
Architecturally, LeanCTX is a Cognitive Context Layer: five subsystems run on every read, command and search. Compression is one of them — context engineering is the product.
Key facts
All numbers are reproducible: lean-ctx benchmark report . measures them on your own repository, and every saving is recorded in an Ed25519-signed ledger.
The short answers to the essential questions.
LeanCTX (short for Lean Context) is the open-source context engineering layer for AI agents. One local Rust binary decides what agents read (10 read modes, 60–90% fewer tokens, ~13-token cached re-reads), remembers what they learn (persistent sessions, knowledge graph), guards what they touch (PathJail, secret redaction, budgets, injection detection), proves what they save (Ed25519-signed ledger, reproducible benchmark) and replays what they saw (git-anchored, signed context snapshots you can restore or share); an optional local proxy compresses what they send — every request’s system prompt, history and tool output, prompt-cache-safe on the wire. Compression — read-side and wire-side — is one of five subsystems, and every original stays locally retrievable. Works with 30+ AI coding tools via MCP and shell hooks; embeds in any agent via a versioned /v1 API with Python, TypeScript and Rust SDKs. Local use is free forever, enforced by CI.
Lean Context. The name describes the job: lean, precise context for AI agents instead of raw, noisy input. LeanCTX is the brand and project name; lean-ctx is the binary, the package and the CLI command. It is not "Lean Cortex" — a misspelling that appeared in early coverage.
No. Compression is one of five subsystems. LeanCTX is a context engineering layer: it decides what agents read, remembers what they learn, guards what they touch, and proves what they save in an Ed25519-signed ledger. Token savings are the receipt — context engineering is the product.
Yes. Local use is free forever, enforced by a public CI gate that fails any commit putting a local capability behind a paywall. The core is open source (Apache-2.0). Paid plans add hosted sync (Pro) and a shared team plane (Team) on top.
Install free, run lean-ctx setup, and watch the first measured gain in under ten minutes. Local use is free forever, enforced by CI.
Cookie preferences
We use analytics to understand how our site is used. You choose what's allowed — no tracking runs until you decide.
Essential
Site functionality, security, preferences
Analytics
Pageviews & usage patterns · PostHog EU (Frankfurt) · No cross-site tracking
Read our Privacy Policy for full details. You can change your preferences anytime.