Get Started
LeanCTX documentation
LeanCTX (short for Lean Context) is the context intelligence layer for AI agents. Start with an install, learn by journey, or jump straight to a topic or tool.
LeanCTX (short for Lean Context) is the open-source context intelligence 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) and proves what they save (Ed25519-signed ledger, reproducible benchmark). Compression 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.
Read the full storyStart here
Learn by journey
All 23 journeys →The twenty-three code-grounded journeys are how LeanCTX is actually used, grouped into four journey tracks. Pick the one that sounds like you.