Skip to content
FossShelf
Home / Categories / For AI Engineers

cognee

Persistent memory for AI agents across sessions

Replaces Zep, Pinecone

33.35K starsApache-2.0reviewed 29 Jun 2026last commit 14 Nov 2026
Screenshot of cognee

Who it's for

Long-term agent memory

Use Cognee when agents need to retain user preferences, project history, documents, and workflow context across sessions.

You only need short-lived chat history inside one conversation.

Private knowledge graph for AI apps

Teams can ingest internal data and give agents relationship-aware retrieval from a self-hosted memory layer.

Your data cannot be placed into an agent-accessible memory system.

Agent framework integration

Use the Python, TypeScript, MCP, and plugin paths to attach memory to existing agent stacks.

You need only a hosted vector database with no graph or agent-memory semantics.

The problem

AI agents lose continuity when memory is only prompt history or basic vector search. Cognee addresses that by turning data into a self-hosted memory layer with graph relationships, embeddings, and retrieval APIs that agents can use across sessions.

How it works

Persistent agent memory

Cognee gives agents long-term memory across sessions through remember, recall, forget, and improve operations.

Self-hosted knowledge graph

The README says Cognee continuously builds a knowledge graph from ingested data so agents can connect information by relationship.

Hybrid retrieval model

Cognee combines vector embeddings, graph reasoning, and relational search instead of relying on one retrieval method.

Multiple integration paths

Developers can use Python, CLI, Docker, MCP server mode, Claude Code plugin, Cognee Cloud, or the TypeScript client.

Postgres memory layer option

The README describes running the memory layer on Postgres, with dedicated graph and vector backends available for larger workloads.

Features

  • Persistent agent memory
  • Self-hosted knowledge graph
  • Hybrid retrieval model
  • Multiple integration paths
  • Postgres memory layer option

How to install

uv pip install cognee # Optional Postgres extra pip install "cognee[postgres]"

Recommended for this setup

Strengths

  • Purpose-built for agents: Cognee focuses on agent memory rather than generic document storage, which makes its API and integrations relevant to agent workflows.
  • Self-hosting path: Teams can run the memory layer themselves through Python, Docker, or database-backed deployment options.
  • Broader than vector search: Graph reasoning and ontology generation help preserve relationships that pure vector retrieval can flatten.

Trade-offs

  • Infrastructure choices still matter: Teams must pick and operate the right backend mode for their workload, from embedded local development to Postgres or dedicated services.
  • Memory quality depends on data hygiene: Agents recall better when the ingested data, dataset boundaries, and cleanup routines are maintained carefully.
  • Not just a drop-in vector API: Teams looking only for managed vector search may find Cognee's graph and memory model more than they need.

Tech stack

Languages
Python, TypeScript, JavaScript, HTML, Shell, Dockerfile, CSS, Go Template, BAML, Mako
Frameworks
FastAPI, Next.js, React
Databases
Redis, PostgreSQL
Tooling
AWS

FAQ

What is Cognee?

Cognee is an open-source AI memory tool that builds a self-hosted knowledge graph for agents.

What license does Cognee use?

GitHub metadata reports Cognee as Apache-2.0 licensed.

How do you install Cognee?

The README shows uv pip install cognee for Python use, plus Docker Compose, Docker image, MCP server, and TypeScript client paths.

Does Cognee require a separate graph database?

No. The README says Cognee can run the memory layer on Postgres, while still supporting dedicated graph and vector backends for workloads that need them.

Similar tools

More in AI Engineers