explaingit

topoteretes/cognee

17,214PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

Open-source memory layer for AI agents that persists knowledge in a graph across sessions, letting agents recall documents, decisions, and past workflows instead of starting fresh every time.

Mindmap

mindmap
  root((cognee))
    What it does
      Persistent memory
      Knowledge graph
      Cross-session recall
    Operations
      remember
      recall
      forget
      improve
    Tech stack
      Python 3.10-3.14
      pip poetry uv
    Use cases
      AI assistants
      Multi-agent memory
      Company knowledge base
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add long-term memory to a chatbot so it remembers past conversations and company documents.

USE CASE 2

Build a multi-agent system where agents share a common knowledge graph.

USE CASE 3

Create an AI assistant that learns from accumulated notes and improves answers over time.

USE CASE 4

Use session memory for fast caching during a chat then sync to a permanent graph store.

Tech stack

Pythonpippoetryuv

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Python 3.10+ and installation via pip, poetry, or uv.

License not mentioned in the explanation.

In plain English

Cognee is an open-source memory layer for AI agents. AI agents are programs that use a large language model to perform tasks on your behalf, and one of their weaknesses is that they tend to forget things between conversations. Cognee fixes that by giving an agent a persistent, shared store of documents, decisions and past workflows that it can recall and connect later, so it answers with proper context instead of starting fresh every time. Under the hood, Cognee combines two ways of finding information. Embeddings, which let it search by meaning rather than by exact keywords, and graphs, which let it track how different pieces of information relate to each other. You feed it data in any format, and it ingests that data into a knowledge graph that keeps evolving as more is added. The library exposes four main operations: remember to save something, recall to query it back, forget to delete data, and improve to refine the stored knowledge. There is also a session memory mode for fast, short-term caching that later syncs to the permanent graph. You can drive Cognee from Python, from a command-line tool called cognee-cli, or through a local UI, and there are ready-made plugins for Claude Code and other agent frameworks. Someone would actually use this if they are building an AI assistant or agent that needs to learn from accumulated company documents, user preferences, or earlier conversations, and want that memory to persist across sessions and be shareable between several agents. The tech stack is Python, supporting versions 3.10 through 3.14, with installation via pip, poetry or uv. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Using Cognee, show me how to ingest a set of PDF documents and then recall relevant information using the recall() operation.
Prompt 2
Write Python code that uses Cognee to add persistent memory to a Claude agent so it remembers user preferences across sessions.
Prompt 3
How do I set up Cognee with the Claude Code plugin so my agent has persistent memory?
Prompt 4
Give me an example of using Cognee's forget() and improve() operations to manage a knowledge graph.
Prompt 5
Show me how to connect multiple agents to a shared Cognee memory store.
Open on GitHub → Explain another repo

← topoteretes on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.