Key Takeaways
- cognee (cognee.ai) is a free, open-source Python library for AI agent memory built around a self-hosted knowledge graph, not a hosted app
- Apache-2.0 licensed, confirmed via the GitHub repository
- Built by Topoteretes UG, a Berlin-based company led by managing director Vasilije Markovic
- Over 30,700 GitHub stars as of this review (verified 2026-09-18)
- Locality is hybrid: the knowledge-graph engine and vector store run self-hosted, but default LLM/embedding processing calls go to a configured external provider — local Ollama models are also supported
- Core operations are
cognee.add()(ingest),cognee.cognify()(build the graph), andcognee.search()(query it), with newer high-levelremember()/recall()convenience functions built on top of that same pipeline - Integrates with Claude Code, Cursor, LangGraph, CrewAI, OpenClaw, and Model Context Protocol (MCP) tooling
📍 In One Sentence
cognee is a free, open-source (Apache-2.0) Python library from the Berlin-based company Topoteretes that gives AI agents persistent memory by building a self-hosted knowledge graph out of documents, code, and conversations, rather than relying only on vector similarity search.
💬 In Plain Terms
Instead of just chopping your documents into chunks and matching them by similarity like a typical RAG setup, cognee reads your data and builds a map of the entities and relationships in it — a knowledge graph — that an agent can query for more structured, connected answers. It runs on your own machine or server via pip install cognee, and it is free.
What Is cognee?
cognee is a Python library that gives AI agents and applications persistent, structured memory by transforming raw text, code, and conversation history into a queryable knowledge graph. Its own GitHub description positions it as an open-source AI memory platform for enabling persistent memory across agent sessions, built by ingesting data through a pipeline that extracts entities and relationships rather than only embedding flat chunks of text.
- Product type: a self-hosted Python library and pipeline framework, not a standalone downloadable app or a fully managed SaaS by default
- Creator: Topoteretes UG (haftungsbeschränkt), a Berlin-registered company; managing director Vasilije Markovic
- Repository: github.com/topoteretes/cognee
- License: Apache-2.0, confirmed via the repository's license file
- Locality: hybrid — the knowledge-graph engine, vector store, and any local databases run on your own infrastructure, but text sent for entity extraction, enrichment, and embedding is by default routed to whichever external LLM/embedding provider you configure; cognee also documents support for routing that processing through a local Ollama model instead
- Scale: over 30,700 GitHub stars, and cognee's own site cites more than 5 million SDK runs per month as of this review
- Current version: v1.6.1, released 2026-09-24 (confirmed via cognee's GitHub releases)
cognee's Project History
cognee is developed and maintained by Topoteretes, a Berlin-based company, with the project publicly positioned as an "AI memory platform for agents." This review verified the company name, headquarters city, and current scale (star count, monthly SDK run volume) directly from cognee's own site and GitHub repository, but did not find a specific, dated public announcement of the project's initial launch date to cite here — check the GitHub repository's commit history directly if you need that level of detail.
- cognee positions itself around an Extract-Cognify-Load–style pipeline: ingest data, build a knowledge graph and enrichment layer from it ("cognify"), then make that graph queryable — the current SDK exposes this as
add(),cognify(), andsearch(), with newerremember()/recall()wrapper functions layered on top for simpler use - cognee reports over 5 million SDK runs per month and named production users including Bayer (research memory), Knowunity, SlideSpeak, and the University of Wyoming, per cognee's own site
- Cognee Cloud, a separate managed offering, was introduced as an optional path for teams that want the same memory layer without self-hosting the engine
What Can You Do With cognee?
cognee's feature set centers on turning unstructured data into a structured, queryable memory layer for agents and applications, per cognee's own GitHub README and documentation.
- Knowledge graph construction — cognee extracts entities, relationships, and structure from text and code and builds a graph out of it, rather than only storing flat embedding vectors
- Multi-format ingestion — documents, source code, and conversation history can all be fed into the same pipeline
- Automatic retrieval routing — cognee's search layer selects a retrieval strategy (graph traversal, vector similarity, or a hybrid) based on the query, instead of requiring you to hand-pick one
- Session memory with background sync — conversational context can be held in session memory and synchronized into the permanent graph in the background
- Graph visualization and custom ontologies — you can inspect the built graph visually and define your own ontology so extraction follows your domain's specific entity and relationship types
- Hybrid locality with local-model support — cognee's own default flow sends data to a configured external LLM/embedding provider for processing, but it documents support for pointing that processing at a local Ollama instance instead, keeping the whole pipeline on your own hardware
- Agent and IDE integrations — documented integrations include Claude Code (as a memory plugin), Cursor, Cline, LangGraph, CrewAI, OpenClaw, and Model Context Protocol (MCP) support for connecting cognee as a tool to MCP-compatible clients
- Multiple vector store backends — LanceDB is the default, with built-in support for PGVector, Turso/libSQL, Neptune Analytics, and ChromaDB, plus community adapters for Qdrant, Redis, FalkorDB, Pinecone, Turbopuffer, Milvus, and Weaviate, per cognee's vector store documentation
Usage Examples: Three Ways to Use cognee
These are concrete workflows built from cognee's documented Python API, run after pip install cognee.
- Build memory from a piece of text and query it: run
pip install cognee, then callcognee.remember(text)to ingest andcognee.recall(query_text=...)to query — cognee's own documentation describesremember()as running ingestion, chunking, entity extraction, and graph building in one step, andrecall()as auto-routing the query to the best retrieval strategy - Use the lower-level ECL-style pipeline directly for more control: call
cognee.add(data)to ingest raw text or files,cognee.cognify()to run entity/relationship extraction and build the knowledge graph, thencognee.search(query_text=...)to query it — useful when you want to inspect or customize what happens at each pipeline stage rather than using the single-callremember()/recall()wrappers - Point cognee at a local Ollama model instead of a cloud LLM/embedding provider: cognee's configuration supports setting the LLM and embedding provider to a local Ollama endpoint, so the entity-extraction and embedding steps run on your own hardware instead of calling out to an external API — check cognee's own configuration documentation for the current environment-variable names before wiring this into a project, since provider configuration details can change between releases
Build memory from a piece of text and query it
cognee's own quickstart documentation shows the core loop as add-then-query, using its higher-level convenience functions:
import asyncio
import cognee
async def main():
text = "cognee turns documents into AI memory."
await cognee.remember(text)
results = await cognee.recall(query_text="What does cognee do?")
for result in results:
print(result.text)
asyncio.run(main())Install cognee
cognee installs free via pip (or uv), and its source code is on GitHub. There is no standalone GUI installer, since cognee is a library you add to a Python project.
Source | Link |
|---|---|
| Official site (docs, use cases, Cognee Cloud) | cognee.ai |
| Documentation | docs.cognee.ai |
| GitHub repository (source code, Apache-2.0) | github.com/topoteretes/cognee |
| PyPI package | pypi.org/project/cognee |
Install with pip install cognee (or uv pip install cognee if you use uv). cognee requires a Python environment and, for the default hosted-provider flow, an API key for your chosen LLM/embedding provider — or a running local Ollama instance if you configure it for fully local processing. cognee has no visual, drag-and-drop workflow builder — the closest thing to a GUI is cognee-cli -ui, a CLI-launched graph/data viewer for an existing install, not a builder.
cognee Pricing: Is cognee Really Free?
The open-source cognee engine is free and Apache-2.0 licensed — there is no paid tier gating any feature of the library itself. Cognee Cloud is a separate, optional managed offering for teams that want the same memory layer without self-hosting the engine; cognee's own site does not publish detailed Cognee Cloud pricing on its homepage, so check cognee.ai directly for current managed-tier pricing before assuming a specific figure.
- Open-source engine: free, Apache-2.0, no usage limits imposed by cognee itself
- Your own costs still include whatever your configured external LLM/embedding provider charges for the API calls cognee makes during
cognify()/remember()— or nothing extra beyond your own hardware if you route that processing through a local Ollama model - Cognee Cloud: a separate, optional managed offering; cognee's own site directs interested teams to "move to Cognee Cloud when you need managed scale" without listing exact tier pricing on the main page
- No account or sign-up is required to install and use the open-source library
cognee vs. Langchain-Chatchat
cognee and Langchain-Chatchat both help you build retrieval-augmented applications on your own data, but they solve different layers of the problem. Langchain-Chatchat is a ready-to-run, self-hosted RAG chat application built on LangChain, aimed at getting a working document-chat UI running quickly. cognee is a lower-level memory library you integrate into your own agent or application code, and its core differentiator is building a knowledge graph — entities and their relationships — rather than only chunking documents into a flat vector index.
What it is
- cognee:
- A memory library (knowledge graph + retrieval) you integrate into your own code
- Langchain-Chatchat:
- A ready-to-run, self-hosted RAG chat application
Retrieval approach
- cognee:
- Knowledge graph plus automatic retrieval-strategy routing (graph, vector, or hybrid)
- Langchain-Chatchat:
- Primarily vector-similarity retrieval over chunked documents
Interface
- cognee:
- Python API and MCP server — no built-in chat UI
- Langchain-Chatchat:
- Built-in web chat UI
Best fit
- cognee:
- Developers building agent memory or a custom knowledge-graph-backed retrieval layer
- Langchain-Chatchat:
- Teams that want a working document-chat app without building one from scratch
License
- cognee:
- Apache-2.0
- Langchain-Chatchat:
- Apache-2.0
These tools are not mutually exclusive — a Langchain-Chatchat-style application could, in principle, use cognee as its underlying memory/retrieval layer instead of a flat vector store. Verify current feature sets on each project's own repository before choosing, since both ship updates frequently.
Who Should Use cognee?
Whether cognee fits depends on whether you are writing code that needs structured, connected memory, rather than looking for a ready-made chat application.
Use cognee if
- You are building an AI agent or application that needs durable memory across sessions, not just a single conversation's context window
- You want retrieval that understands relationships between entities in your data, not only flat text similarity
- You want the knowledge-graph engine to run on your own infrastructure, with the option to route model calls to a local Ollama instance instead of a cloud provider
- You are comfortable integrating a Python library into your own codebase rather than using a pre-built chat UI
- You want native integrations with agent tooling like Claude Code, Cursor, LangGraph, or CrewAI via MCP
Look elsewhere if
- You want a ready-to-use, self-hosted chat interface out of the box — look at a RAG chat application like Langchain-Chatchat instead
- You need fully local processing with zero external API calls by default — cognee's default flow sends data to an external provider unless you explicitly configure a local Ollama backend
- You only need simple vector similarity search with no graph structure — a dedicated vector database may be simpler to operate; see the Chroma review for that narrower layer
- You want a managed, zero-ops product with clear published pricing rather than a self-hosted library — evaluate Cognee Cloud directly against your budget before committing
Competitors and Alternatives
cognee sits in the RAG-and-agent-memory layer, alongside orchestration frameworks and other retrieval frameworks that developers commonly evaluate together. These are not identical products — some are broader orchestration frameworks, others are narrower retrieval libraries — but they compete for the same "how do I give my LLM app structured access to my data" decision.
LangChain
- Best known for:
- General-purpose LLM application framework with a large ecosystem of retrieval and agent integrations
- Link:
- LangChain review
Articles about LangChain (9)
- LangChain Review: Features, Pricing, AlternativesUpdated September 5, 2026
- Local Knowledge & Retrieval Tools Compared (2026): RAG, Document Chat, Vector Databases, Notes and SearchUpdated September 20, 2026
- Self-Hosted AI Starter Kit Review: n8n + Ollama + Qdrant in One Compose FileUpdated September 19, 2026
- Chroma Review: Open-Source Vector Database for AI and RAGUpdated September 18, 2026
- Langchain-Chatchat Review: Self-Hosted RAG and Agent FrameworkUpdated September 18, 2026
- Milvus Review: The Open-Source Vector Database for Local RAGUpdated September 18, 2026
- Qdrant Review: The Self-Hosted Vector Database for RAGUpdated September 18, 2026
- Docker Model Runner Review: Local LLMs via the Docker CLIUpdated September 12, 2026
- n8n Review: AI Workflow Automation With Local Ollama SupportUpdated September 12, 2026
+31 more not shown
LlamaIndex
- Best known for:
- Data-framework focused specifically on indexing and retrieval for LLM applications
- Link:
- LlamaIndex review
Articles about LlamaIndex (10)
- LlamaIndex Review: Code-First RAG Framework, Not a No-Code BuilderUpdated September 2, 2026
- Local Knowledge & Retrieval Tools Compared (2026): RAG, Document Chat, Vector Databases, Notes and SearchUpdated September 20, 2026
- Chroma Review: Open-Source Vector Database for AI and RAGUpdated September 18, 2026
- Milvus Review: The Open-Source Vector Database for Local RAGUpdated September 18, 2026
- Qdrant Review: The Self-Hosted Vector Database for RAGUpdated September 18, 2026
- Dify Review: Open-Source LLMOps Platform vs. LangChain, FlowiseUpdated September 2, 2026
- Flowise Review: Visual LangChain Workflow Builder Is Shutting DownUpdated September 2, 2026
- Haystack Review: deepset's RAG Framework vs. LangChain and LlamaIndexUpdated September 2, 2026
- RAGFlow Review: Citation-Grade RAG for Complex DocumentsUpdated September 2, 2026
- txtai Review: The Embedded Vector Database That Skips the ServerUpdated September 2, 2026
+17 more not shown
Haystack (deepset)
- Best known for:
- Open-source RAG and search pipeline framework from deepset
- Link:
- Haystack review
txtai
- Best known for:
- Lightweight embedded vector database and semantic search library
- Link:
- txtai review
Articles about txtai (2)
- txtai Review: The Embedded Vector Database That Skips the ServerUpdated September 2, 2026
- Local Knowledge & Retrieval Tools Compared (2026): RAG, Document Chat, Vector Databases, Notes and SearchUpdated September 20, 2026
Also mentioned in:
- Weaviate Review: The Self-Hostable Vector Database for RAGUpdated September 19, 2026
- Milvus Review: The Open-Source Vector Database for Local RAGUpdated September 18, 2026
- Qdrant Review: The Self-Hosted Vector Database for RAGUpdated September 18, 2026
This is not an exhaustive list of memory and retrieval tools — see the Local LLM Software Directory for the full, regularly updated catalog, including cognee's own directory entry.
Common Mistakes When Evaluating cognee
Most confusion about cognee comes from assuming it is a fully local tool by default, confusing it with a plain vector database, or assuming a specific API function is stable long-term.
Mistake 1: Assuming cognee is fully local by default
cognee's locality is hybrid: the knowledge-graph engine and storage run on your own infrastructure, but default LLM/embedding calls go to whichever external provider you configure. If you need zero external calls, you must explicitly configure a local Ollama backend for both LLM and embedding processing.
Mistake 2: Treating cognee as a drop-in vector database replacement
cognee is a memory and knowledge-graph library, not a vector database product. It typically uses a vector store as one component of its pipeline, but its core value is the graph-based entity/relationship layer on top, not raw vector storage — for a dedicated vector database, see the Chroma review.
Mistake 3: Assuming remember()/recall() are the only API
cognee's current quickstart documentation highlights the simpler remember()/recall() functions, but the underlying add()/cognify()/search() pipeline still exists for more granular control. Check docs.cognee.ai directly, since which functions are documented as primary can change between releases.
Mistake 4: Assuming a specific Cognee Cloud price without checking
cognee's homepage references moving to Cognee Cloud for managed scale but does not publish detailed pricing tiers on that page. Verify current Cognee Cloud pricing directly on cognee.ai rather than assuming a figure from a secondary source.
Frequently Asked Questions
What is cognee?
cognee (cognee.ai, source at github.com/topoteretes/cognee) is a free, open-source (Apache-2.0) Python library that gives AI agents persistent memory by building a self-hosted knowledge graph out of documents, code, and conversations.
Is cognee free?
Yes, the open-source cognee engine is free and Apache-2.0 licensed, with no paid tier gating any library feature. Cognee Cloud is a separate, optional managed offering with its own, separately priced tier — check cognee.ai for current pricing.
How do I install cognee?
Run pip install cognee (or uv pip install cognee if you use uv). It requires a Python environment and, for the default flow, an API key for your configured LLM/embedding provider, or a running local Ollama instance if configured for local processing.
Does cognee run fully offline?
Not by default. cognee's locality is hybrid — the knowledge-graph engine and storage are self-hosted, but default LLM/embedding calls go to an external provider you configure. cognee documents support for routing that processing through a local Ollama model instead, for a fully local setup.
How is cognee different from a plain RAG/vector-database setup?
A plain RAG setup typically chunks documents and retrieves them by vector similarity alone. cognee additionally extracts entities and relationships from your data into a knowledge graph, then automatically routes queries to graph traversal, vector similarity, or a hybrid strategy, aiming for more structured, connected retrieval.
What is the cognee API for ingesting and querying data?
The current quickstart shows cognee.remember(text) to ingest and cognee.recall(query_text=...) to query. The lower-level pipeline underneath is cognee.add() (ingest), cognee.cognify() (build the graph), and cognee.search() (query), for more granular control.
Who builds cognee?
cognee is built by Topoteretes UG (haftungsbeschränkt), a Berlin-based company led by managing director Vasilije Markovic.
What license does cognee use?
Apache-2.0, confirmed via the GitHub repository.
Can cognee use local models via Ollama?
Yes. While cognee's default flow routes LLM and embedding calls to a configured external provider, it also documents support for pointing that processing at a local Ollama instance instead.
What agent tools and IDEs does cognee integrate with?
Documented integrations include Claude Code (as a memory plugin), Cursor, Cline, LangGraph, CrewAI, OpenClaw, and Model Context Protocol (MCP) support for connecting cognee as a tool to MCP-compatible clients.
How does cognee compare to LangChain or LlamaIndex?
LangChain and LlamaIndex are broader LLM-application and data-indexing frameworks that can incorporate many retrieval backends. cognee is narrower and more specific: a memory library centered on building and querying a knowledge graph, which can be used alongside frameworks like LangChain rather than strictly instead of them.