Cognee gives AI agents persistent memory by turning documents, code, and conversations into a knowledge graph that agents search and reuse across sessions. Use cases include a shared company knowledge base that links decisions to the discussion and code behind them, project memory that carries past decisions and fixes between agent runs, and domain memory structured by custom data models and ontologies.
Text becomes entities, relationships, and searchable chunks, and code becomes a graph of symbols and dependencies. Session distillation curates accepted lessons from a session into permanent memory. At query time, retrieval selects graph, vector, or code context, and your application can inspect the retrieved evidence before using it.
| Operation | What it does |
|---|---|
| remember | Stores content or code in permanent memory, or in a session |
| recall | Retrieves context and answers with automatic routing or a chosen search strategy |
| improve | Enriches memory, applies feedback, and moves session knowledge into the graph |
| forget | Removes a specific item or dataset |
Cognee runs locally without an LLM: a small GLiNER model extracts the graph and a local model embeds text on the CPU, and retrieval returns source passages. Adding an LLM, by default OpenAI or local Ollama models, produces generated answers and enables the improvement stages. The whole memory layer can also run on a single Postgres instance holding relational metadata, vectors, and graph state, released as a demo feature.
On the BEAM conversational-memory evaluation, Cognee reports a score of 0.79 at 100K tokens of context and an exploratory 0.67 at 10M tokens, under different conversations and retrieval procedures.
Features
- Knowledge graph memory: extracts entities and relationships from text and a symbol and dependency graph from code
- Session distillation: turns accepted session lessons into durable memory another session can retrieve
- Keyless local mode: builds and searches text memory with local CPU models and no LLM key
- Custom ontologies: structures memory around the entities and relationships an application needs
- Agent plugins: memory plugins for Claude Code, Codex, and OpenClaw, plus an MCP server for Cursor, Cline, and other MCP clients
- SDKs and API: Python, TypeScript, and Rust libraries and a REST API
- Memory import: imports memory from Mem0, Letta, Zep, or Graphiti using the COGX exchange format
- Postgres-only deployment: runs graph, vector, and relational storage on one Postgres instance as a demo feature
- Graph visualization: a local UI to browse the knowledge graph and inspect its connections
- Source connectors: Google Drive and Gmail connectors bundled in the SDK



