cognee logo
cognee
★ 33.6k
vs
lean-ctx logo
lean-ctx
★ 4.0k

cognee vs lean-ctx

cognee: Cognee turns documents, code and conversations into persistent graph-based memory for agents to retrieve across sessions. Its local text pipeline can extract and search with small models without an LLM API key, while generated answers and some media processing require additional model configuration.; lean-ctx: lean-ctx is an open-source MCP server designed to drastically reduce LLM token costs for AI coding tools like Claude Code, Cursor, and Copilot. It achieves this by transparently compressing CLI output and file context, offering up to 99% savings and making AI coding faster, cheaper, and more effective without changing workflows.

01

TL;DR

cognee logo
cogneeMemory & Context · ★ 33.6k
When to choose:
  • Your tasks depend on relationships across sources and sessions.
  • You can evaluate evidence quality and maintain the memory lifecycle.
When to skip:
  • A maintained project file already contains all the context you need.
  • You need proven retrieval accuracy without running a corpus-specific pilot.
lean-ctx logo
lean-ctxMemory & Context · ★ 4.0k

Reducing token costs for Claude Code, Cursor, and Copilot

02

Side-by-Side Comparison

Field
cognee logocognee
lean-ctx logolean-ctx
Category
Memory & Context
Memory & Context
Stars
★ 33.6k
★ 4.0k
License
Apache-2.0
MIT
Install Command
uv pip install "cognee[gliner]"
curl -fsSL https://leanctx.com/install.sh | sh && lean-ctx setup && lean-ctx doctor
Updated
2d ago
2d ago
Open Source
Yes
Yes
Tags
agent-memory, agent-skills, ai
agentic-coding, ai, ai-coding
03

Features

cognee logocognee
01Provides remember, recall, improve and forget operations for stored knowledge.
02Uses a local GLiNER extractor and local embeddings when no LLM key is configured.
03Connects graph, vector and code context during retrieval.
04Offers Python, CLI, plugins and MCP integration paths.
lean-ctx logolean-ctx
01Transparent shell hook for CLI output compression
02Context server with 28 intelligent tools
03One-command integration for AI coding agents
04Adaptive LLM communication with Cognitive Efficiency Protocol
05Cross-session memory for context continuity
04

Use Cases

cognee logocognee
↳Retain project decisions, fixes and lessons across agent sessions.
↳Connect company documentation, conversations, tickets and code in shared memory.
↳Model domain entities and relationships for grounded context retrieval.
lean-ctx logolean-ctx
↳Reducing token costs for Claude Code, Cursor, and Copilot
↳Optimizing MCP server performance
↳Saving $30-100+ per month on AI coding API costs
05

Best For

cognee logocognee
Most Popular
lean-ctx logolean-ctx
—
FAQ

FAQ

What is the difference between cognee and lean-ctx?
Both cognee and lean-ctx are in the Memory & Context category. cognee has 33.6k stars, while lean-ctx has 4.0k stars.
Which is better, cognee or lean-ctx?
The best choice depends on your use case. Choose cognee if Retain project decisions, fixes and lessons across agent sessions., and lean-ctx if Reducing token costs for Claude Code, Cursor, and Copilot.
Is cognee free or open source?
Yes, cognee is open source on GitHub (Apache-2.0).
Is lean-ctx free or open source?
Yes, lean-ctx is open source on GitHub (MIT).
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
→

Related