{"data":{"slug":"yvgude-lean-ctx","name":"lean-ctx","tagline":"Control what your AI can see. LeanCTX (Lean Context) is the context intelligence layer for AI agents — one local Rust binary that decides what they read, remembers what they learn, guards what they to","github_url":"https://github.com/yvgude/lean-ctx","owner":"yvgude","repo":"lean-ctx","owner_avatar_url":"https://avatars.githubusercontent.com/u/7590809?v=4","primary_language":"Rust","stars":3221,"forks":295,"topics":["agentic-coding","ai","ai-agents","ai-coding","claude-code","context-engineering","context-intelligence","context-layer","copilot","cursor","developer-tools","gemini-cli","lean-context","llm","mcp","mcp-server","reduce-token-costs","rust","token-optimization"],"archived":false,"github_pushed_at":"2026-07-11T14:32:59+00:00","maintenance_label":"Very active","url":"https://www.graphcanon.com/tools/yvgude-lean-ctx","markdown_url":"https://www.graphcanon.com/tools/yvgude-lean-ctx.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/yvgude-lean-ctx","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=yvgude-lean-ctx","description":"Control what your AI can see. LeanCTX (Lean Context) is the context intelligence layer for AI agents — one local Rust binary that decides what they read, remembers what they learn, guards what they touch, and proves what they save. 60–90% fewer tokens as the receipt. 76 MCP tools, 30+ agents, local-first.","homepage_url":"https://leanctx.com","license":"Apache-2.0","open_issues":4,"watchers":21,"ai_summary":null,"readme_excerpt":"# 1) Install (pick one)\ncurl -fsSL https://leanctx.com/install.sh | sh      # universal (no Rust needed)\nbrew tap yvgude/lean-ctx && brew install lean-ctx    # macOS / Linux\nnpm install -g lean-ctx-bin                          # Node.js\ncargo install lean-ctx                               # Rust\npi install npm:pi-lean-ctx                           # Pi Coding Agent\n\n---\n\n# pip install lean-ctx-sdk\nfrom lean_ctx import compress\nmessages = compress(messages, model=\"claude-sonnet-4\")\n```\n\n```ts\n// npm install lean-ctx-sdk\nimport { compress } from \"lean-ctx-sdk\";\nmessages = await compress(messages, { model: \"gpt-4o\" });\n```\n\nFramework adapters included (LiteLLM, LangChain, Vercel AI SDK). → **[compress() cookbook](docs/guides/compress-sdk.md)**\n\n**Thin `/v1` contract clients — [`lean-ctx-client`](https://pypi.org/project/lean-ctx-client/) ([npm](https://www.npmjs.com/package/lean-ctx-client) · [crates.io](https://crates.io/crates/lean-ctx-client)).** Wrap the full `/v1` tool, event and session API over the process boundary — never links the engine, so it stays stable as lean-ctx evolves.\n\n```bash\npip install lean-ctx-client     # Python (imports as `leanctx`)\nnpm install lean-ctx-client     # TypeScript / Node\ncargo add lean-ctx-client       # Rust\n```\n\nStart the server with `lean-ctx serve`, then point a client at it. → **[API reference](https://leanctx.com/docs/api-reference/)**\n\n---\n\n## License\n\nApache License 2.0 — see [LICENSE](LICENSE).\n\n\n--- lean-ctx: ctx_compose bundles search+read+symbols in one call ---","github_created_at":"2026-03-23T19:48:59+00:00","created_at":"2026-07-11T23:37:18.483945+00:00","updated_at":"2026-07-11T23:37:30.288192+00:00","categories":[{"slug":"ai-agents","name":"AI Agents","url":"https://www.graphcanon.com/categories/ai-agents","markdown_url":"https://www.graphcanon.com/categories/ai-agents.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/ai-agents"},{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"},{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"}],"tags":[{"slug":"context-layer","name":"context-layer"},{"slug":"ai-coding","name":"ai-coding"},{"slug":"ai","name":"ai"},{"slug":"context-intelligence","name":"context-intelligence"},{"slug":"agentic-coding","name":"agentic-coding"},{"slug":"context-engineering","name":"context-engineering"},{"slug":"claude-code","name":"claude-code"},{"slug":"ai-agents","name":"ai-agents"}],"trust":{"provenance":{"is_fork":false,"github_id":1189918673,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T23:37:26.199Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":30,"days_since_push":0,"last_release_at":"2026-07-11T13:10:19Z"},"security_summary":{"status":"no_manifest","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T23:37:26.648Z","medium_count":0,"scan_profile":"mcp_manifest","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T23:37:25.938Z"},"languages":{"value":["rust"],"source":"github.language","observed_at":"2026-07-11T23:37:25.938Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-07-11T23:37:25.938Z"}}}}