Repolode
topoteretes

topoteretes/cognee

Open-source AI memory platform that turns documents, code and conversations into a self-hosted knowledge graph for AI agents.

Stars
32,573
Forks
3,419
Open issues
916
Last commit
6 hours ago

What is it?

Cognee gives AI agents persistent long-term memory across sessions. It ingests text, code and conversations, extracts entities and relationships into a knowledge graph, and stores searchable chunks alongside vector embeddings so agents can retrieve relevant context later.

The core operations are remember (store content or code, or a session), recall (retrieve context or answers via automatic routing or a chosen search strategy), improve (enrich memory and apply feedback) and forget (remove items or datasets). Without an LLM key, text ingestion and retrieval run on local GLiNER and embedding models on CPU; with an API key, it uses hosted models such as OpenAI, or local Ollama models for generated answers.

Cognee offers Python, TypeScript and REST interfaces, a CLI with a local UI, an MCP server, and plugins for Claude Code and Codex. It can also run its memory layer on a single Postgres instance.

Key features

  • 01Builds knowledge graphs and searchable chunks from text, code and conversations.
  • 02Runs text ingestion and retrieval locally without an LLM API key.
  • 03Supports remember, recall, improve and forget operations for managing memory.
  • 04Provides Python, TypeScript and REST APIs plus a CLI and UI.
  • 05Integrates with Claude Code, Codex, and MCP clients such as Cursor and Cline.
  • 06Can run the memory layer on a single Postgres instance (demo feature).

Use cases

  • Giving a coding agent memory of project context, past decisions and fixes across runs.
  • Building a company knowledge base that links docs, tickets, conversations and code.
  • Grounding an application's agents in custom entities and relationships via ontologies.
  • Running a self-hosted memory backend for agents without relying on a managed service.

Quick start

  1. 1

    Install Cognee with the gliner extra using uv

    uv pip install "cognee[gliner]"
  2. 2

    Save the local quickstart script and run it

    python quickstart.py
  3. 3

    Or use the CLI to remember and recall text

    cognee-cli remember "Marie Curie was born in Warsaw." -d local_quickstart

Things to know

  • Local mode without an LLM uses a demo-grade GLiNER extractor; production-grade accuracy requires contacting the vendor.
  • Generated answers and vision or transcription features need additional LLM configuration.
  • Requires Python 3.10 to 3.14.

Topics

FAQ

What is cognee?
Open-source AI memory platform that turns documents, code and conversations into a self-hosted knowledge graph for AI agents. Cognee gives AI agents persistent long-term memory across sessions. It ingests text, code and conversations, extracts entities and relationships into a knowledge graph, and stores searchable chunks alongside vector embeddings so agents can retrieve relevant context later.
Is cognee free to use? What license does it have?
cognee is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is cognee still maintained?
Actively maintained. The last commit to cognee was on Oct 20, 2026.
What can I use cognee for?
Giving a coding agent memory of project context, past decisions and fixes across runs. Building a company knowledge base that links docs, tickets, conversations and code. Grounding an application's agents in custom entities and relationships via ontologies. Running a self-hosted memory backend for agents without relying on a managed service.
How do I install cognee?
Install Cognee with the gliner extra using uv: uv pip install "cognee[gliner]" Save the local quickstart script and run it: python quickstart.py Or use the CLI to remember and recall text: cognee-cli remember "Marie Curie was born in Warsaw." -d local_quickstart
Where can I get cognee?
The source code and installation instructions are on GitHub: https://github.com/topoteretes/cognee

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects