Back to directory

LeanCTX

A local context engineering layer for AI coding agents that caches, compresses and routes what gets sent to a model, tracking token and cost savings against a measured baseline.

LeanCTX

LeanCTX is a context engineering layer that runs locally alongside a coding agent such as Cursor, Claude Code, Copilot, Windsurf, Codex or Gemini. It reads repositories and runs development commands on the agent's behalf, then compresses what is sent to the model: repeated file reads return a compact deterministic reference instead of resending unchanged content, command output is compressed while preserving salient results, and each proxied request is compressed in a way intended to remain prompt-cache-safe.

It also keeps session memory that persists across chats, and reports real-time token and cost savings through a local dashboard measured against a comparable uncompressed baseline, using a local savings ledger and a shadow mode for comparison. It requires no configuration and is described as local-first, so files and indexes stay on the user's machine.

It is written in Rust and works with more than 30 coding agents.

More in Agent memory

See all 450
  • A long technical guide to AI agent memory: why stateless LLMs need it, the different memory architectures from vector stores to knowledge graphs, and how Cognee implements one as an open-source memory layer.

  • A local, file-based long-term memory layer for a personal AI that never summarizes conversations, keeping every line with a timestamp and searching by time first and words second, rather than retrieving only similar-seeming chunks.

  • NEOTH

    deepwiki.com

    A local-first personal AI daemon in Rust with five memory tiers, consent-gated tools, a WASM plugin sandbox, multi-provider model routing and signed audit logs, aimed at people who want both a daily assistant and a serious coding helper.