{"data":{"slug":"yvgude-lean-ctx","name":"lean-ctx","tagline":"Control what your AI can see by serving context with a local Rust binary.","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":3859,"forks":352,"topics":["agentic-coding","ai","ai-agents","ai-coding","ai-governance","claude-code","context-engineering","context-gateway","context-intelligence","copilot","cursor","developer-tools","gemini-cli","lean-context","llm","mcp","mcp-server","rust","token-optimization"],"archived":false,"github_pushed_at":"2026-10-02T23:29:57+00:00","maintenance_label":"Very active","stars_delta_30d":373,"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":"LeanCTX — Context Gateway for AI Systems. Control what your AI can see. Open-source Engine for context selection, supported controls, and evidence.","homepage_url":"https://leanctx.com","license":"Apache-2.0","open_issues":5,"watchers":23,"ai_summary":"LeanCTX acts as a context intelligence layer for AI agents, controlling read access and memory management locally. It supports token optimization for more than 70 MCP tools with support for multiple programming languages.","readme_excerpt":"### 4. AI Value Gate — cost and outcome tracking\n\nPerformance is the cost of a useful result, not just speed. LeanCTX records\ncosts and outcomes locally; **CPAO (Cost per Accepted Outcome)** is the north-star\nmetric for comparing useful AI work.\n\n- **Context Manager**: browser dashboard with real-time token tracking, compression stats, utilization gauge\n- **Budgets & SLOs**: profiles, roles, per-agent budgets, and throttling policies\n- **Context Proof** (`ctx_proof`, `ctx_verify`): exportable audit trail (verifier, SLO, pipeline and provenance records) plus runtime-checked policy claims (PathJail per touched file, budget)\n\n---\n\n## Cost Intelligence\n\nLeanCTX automatically tracks local cost and outcome signals; it does not add\nthose reports to agent context. CPAO — cost per accepted outcome — is the\nnorth-star metric, while Shadow Mode provides a simulated baseline for savings estimates.\n\n```bash\nlean-ctx savings --period week                 # costs, token savings, and CPAO\nlean-ctx value-report --format markdown --last 20  # recent outcome quality\nlean-ctx shadow --latest                       # latest baseline comparison\n```\n\n---\n\n# 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\n\n---\n\n## License\n\nApache License 2.0 — see [LICENSE](LICENSE).","github_created_at":"2026-03-23T19:48:59+00:00","created_at":"2026-07-11T23:37:18.483945+00:00","updated_at":"2026-10-03T06:00:28.358229+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":"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":"ai-agents","name":"ai-agents"},{"slug":"context-engineering","name":"context-engineering"},{"slug":"context-intelligence","name":"context-intelligence"},{"slug":"rust","name":"rust"},{"slug":"token-optimization","name":"token-optimization"}],"trust":{"provenance":{"is_fork":false,"github_id":1189918673,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-10-03T06:00:26.593Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":27,"days_since_push":0,"last_release_at":"2026-09-27T18:53:24Z","stars_delta_30d":373,"open_issues_delta_30d":0},"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-10-03T06:00:28.029Z"},"languages":{"value":["rust"],"source":"github.language","observed_at":"2026-10-03T06:00:28.029Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-10-03T06:00:28.029Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["When you require granular, localized oversight over what your AI can visualize, learn from, and store within its operations.","If your project involves more than 70 MCP tools or uses multiple programming languages and needs token optimization to keep costs down.","For development environments where data privacy and security are paramount, as LeanCTX ensures that context management is handled locally."],"when_not_to_use":["When there is a dependence on cloud-based solutions for context intelligence, since LeanCTX operates as a local binary.","If your setup does not need context layering or token optimization. In such cases, using LeanCTX would incur overhead without providing significant benefits."],"source":"enrich:decision_facts","observed_at":"2026-07-14T18:03:23.544Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"LeanCTX serves as a context intelligence layer for AI agents, providing localized control over read access and memory management while optimizing token usage for numerous MCP tools, all powered by a local Rust binary."}]}}