Skip to main content
Back

Cognee Hits 18K Stars Giving AI Agents Persistent Memory Across Sessions

Cognee is an open-source graph-vector memory engine that gives AI agents persistent, relationship-aware recall across sessions in under 10 lines of code.

  • What it is: Cognee is an open-source graph-vector memory engine giving AI agents persistent memory across sessions.
  • How it works: Combines a graph store, vector store, and relational store into one memory layer with 14 retrieval modes including chain-of-thought graph traversal.
  • Benchmark results: Scored 0.93 human-like correctness vs. 0.4 for base RAG on HotPotQA multi-hop questions; +1618% exact match with chain-of-thought mode.
  • Integrations: Works natively with LangGraph, OpenAI Agents SDK, Claude Code, Cursor, CrewAI, and any MCP-compatible client.
  • Pricing: Free and open-source (Apache 2.0) for self-hosting; Cognee Cloud from $35/month for managed deployments.
  • Research: Backed by a published arXiv paper on optimizing knowledge graph interfaces for LLM reasoning.

Cognee is an open-source memory platform for AI agents that has quietly crossed 18,000 GitHub stars while solving one of the most stubborn problems in agent development: the moment a session ends, the agent forgets everything. Rather than patching this with a bigger context window, Cognee treats memory as a proper engineering problem, one that deserves its own storage layer, its own retrieval logic, and its own graph structure.

The problem with stateless agents

Your agent forgets everything between sessions. The fix is not a bigger context window, it is persistent memory via a structured knowledge engine. Most teams reach for a vector database and call it done, but vector similarity alone cannot answer questions that require chaining multiple facts together. Ask "What did Alice say last week about the project budget?" and a flat vector search will return the closest embedding, not the right answer. Cognee was built specifically for this gap.

Three stores, one memory engine

Cognee treats memory as a data-engineering problem. Under the hood it unifies three storage layers into a single coherent engine:

  • Graph store for entities, relationships, and structural traversal. Defaults to Kuzu, but also supports Neo4j, FalkorDB, Amazon Neptune, and Memgraph.
  • Vector store for embeddings and semantic similarity. Defaults to LanceDB, with support for Qdrant, pgvector, Redis, Pinecone, and ChromaDB.
  • Relational store for documents, chunks, and provenance tracking. Defaults to SQLite, with PostgreSQL support for production.

The defaults are all file-based, so there is zero infrastructure to set up. Cognee gives AI agents persistent long-term memory across sessions. You ingest data in any format, build a self-hosted knowledge graph, and let every agent recall, connect, and act with full context. A single pip install cognee and an LLM API key is all you need to get started locally.

How the pipeline actually works

Cognee exposes four core async operations. The key one is cognify, which runs a six-stage pipeline: classify documents, check permissions, extract chunks, use an LLM to extract entities and relationships, generate summaries, then embed everything into the vector store and commit edges to the graph. Only new or updated files are processed on re-runs, keeping costs predictable.