Skip to content

Cognee Complete Guide: Turning Documents into Graph Memory for Agents

Aug 22, 2026 1 min
TL;DR Cognee is a data-to-memory pipeline: a relational store preserves sources and provenance, a vector store finds semantically similar content, and a graph store represents entity relationships, exposed through remember, recall, improve, and forget.
Table of Contents
  1. Three stores, three responsibilities
  2. DataPoints, Tasks, and Pipelines are the extension surface
  3. The value and cost of graph memory
  4. OSS and Cognee Cloud
  5. Where it differs
  6. A minimum launch test
  7. References

🌏 中文版

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