About this project

Cognee is an open-source AI memory platform aimed at giving AI agents persistent long-term memory across sessions. It converts documents, code and conversations into a self-hosted knowledge graph that agents can search and reuse, and it can run locally without an API key by relying on small local models (GLiNER extraction plus a local embedding model, downloaded on first use). Core operations are exposed as remember (store content or code in permanent memory, or in a session when a session ID is given), recall (retrieve context and answers via automatic routing or a chosen search strategy), improve (enrich memory, apply feedback, bridge session knowledge into the graph) and forget (remove a specific item or dataset). Text becomes entities, relationships and searchable chunks; code becomes a graph of symbols and dependencies; session distillation curates accepted lessons into permanent memory. Quickstart requires Python 3.10-3.14 and installs via pip/uv with a gliner extra. A bundled demo command loads sample data and runs keyword search without an API key. Configuring an LLM key (for example OpenAI) enables generated answers and media processing; local Ollama models are also documented. A CLI mirrors the Python API, and a UI launcher is available (requires Node.js/npm, Docker for its MCP service). Integrations cover Claude Code and Codex plugins, OpenClaw, MCP clients such as Cursor and Cline, Python, TypeScript and Rust SDKs, and a REST API. Deployment options include a minimal Docker Compose setup, a prebuilt cognee/cognee image with GLiNER baked in, and source-checkout compose profiles for API (8000), UI (3000) and MCP (8001). Since version 1.0 the whole memory layer can run on a single Postgres instance (graph store usage is currently a demo feature). The project publishes a BEAM evaluation report on conversational memory with reported scores of 0.79 at 100K tokens and 0.67 at 10M tokens, with methodology and limitations documented, plus an arXiv paper on optimizing the interface between knowledge graphs and LLMs.