Table of Contents
🌏 中文版
Cognee is an open-source system for turning documents, text, and structured data into searchable AI memory. It extracts entities and relationships as well as embeddings, preserving provenance, vectors, and graph structure in separate stores.
That makes it a composable knowledge pipeline rather than a thin remember() wrapper. It fits document knowledge, research corpora, and ontology-heavy domains; it may be excessive for a few user preferences.
Three stores, three responsibilities
files / text / URLs
│ loader + chunker
▼
relational store ─ provenance / datasets / chunks
│
├── vector store ─ semantic retrieval
│
└── graph store ─ entities / relationships
│
▼
recall / reasoning
The relational layer tracks sources and chunks, the vector layer supports similarity, and the graph layer stores nodes and edges. Local defaults make experimentation easy; production backends can be replaced. That flexibility leaves cross-store consistency, backup, and deletion testing with the operator.
DataPoints, Tasks, and Pipelines are the extension surface
DataPoints are structured units that become graph nodes, Tasks perform transformations, and Pipelines compose Tasks. Older examples use add, cognify, memify, and search; the v1.0 lifecycle is summarized as remember, recall, improve, and forget.
import asyncio
import cognee
async def main():
await cognee.remember("Project Atlas uses PostgreSQL.")
result = await cognee.recall("Which database does Atlas use?")
print(result)
asyncio.run(main())
Applications that care about chunking, entity schemas, or enrichment should use lower-level pipelines rather than treating the high-level API as an invisible box.
The value and cost of graph memory
Vectors find semantically similar passages; graphs represent relationships and multi-hop paths. Cognee adds Node Sets, ontologies, custom DataPoints, and multiple search strategies.
The cost starts at ingestion. Entity and relationship extraction depend on models, prompts, and schema. Schema evolution can leave old graph shapes behind. Deletion must remove every derived chunk, embedding, node, and edge—not merely the source row.
OSS and Cognee Cloud
OSS fits local, air-gapped, and heavily customized deployments. Cognee Cloud manages storage and pipeline execution and adds UI and dataset permissions. Evaluate not only self-hosting, but where model calls happen, how all three stores are backed up, how user deletion propagates, and whether dataset authorization is enforced before retrieval.
Where it differs
Mem0 centers on personalized memory records, Zep/Graphiti on facts that change over time, and Letta on a stateful runtime with editable memory blocks. Cognee's center of gravity is transforming source data into customizable knowledge structures, overlapping more with RAG ingestion than with conversation-history libraries.
A minimum launch test
Prepare documents containing namesakes, negation, and version changes. After ingestion, trace every source to chunks, nodes, and edges. Update one document and delete another, then query for stale facts. Finally place identically named facts in two user or dataset scopes and require strict retrieval isolation.
References
Loading...