repowisetopoteretes/cognee

topoteretes / cognee

Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.

Python★ 31,446

github.com/topoteretes/cogneeIndexed at 6df1edaUp to date with upstream

What is cognee?

cognee is an open-source AI memory platform for agents that provides persistent long-term memory across sessions. It ingests data, builds a self-hosted knowledge graph, and combines vector embeddings with graph reasoning to connect information. cognee is primarily written in Python, with TypeScript and JavaScript components.

Written by a model from the README and the source

2,262 files and 13,146 symbols in 15 modules, led by Python (1,810 files) and TypeScript (226).

Code health

6.6out of 10Fair

Hotspots average 4.6, the place fixes pay off most.

On the leaderboards:#2 of 4 Agent memory layers#34 of 50 Python repos

Use topoteretes/cognee in your agent

Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.

  1. 1.In Claude, open Customize → Connectors, click +, then Add custom connector. On a Team or Enterprise plan an owner adds it first under Organization settings → Connectors.
  2. 2.Paste the server URL below as the Remote MCP server URL, then click Add.
  3. 3.Click Connect. A Repowise sign-in window opens. Approve access.
  4. 4.Repowise's tools are now available in your Claude chats.

Connect with one click. Sign in with Repowise (OAuth), no API key to copy. Works in Claude on the web, desktop, and mobile.

Docs
bash
https://api.repowise.dev/mcp/topoteretes/cognee
Editors need an API key: sign in to create one.Sign in to connect

This repo is public, so anyone with a Repowise account and an API key can connect.

Try asking

  • get_overview()
  • get_answer("how is cognee put together?")
  • get_why("why is cognee structured this way?")

Explore cognee

Key features of cognee

  • Cognee ingests data in any format and builds a self-hosted knowledge graph.
  • Cognee combines vector embeddings, graph reasoning, and ontology generation to make documents searchable by meaning and connected by relationships.
  • Cognee provides persistent memory across sessions for AI agents.
  • Cognee supports unified ingestion, graph and vector search, local operation, ontology grounding, and multimodal data.
  • Cognee provides the remember, recall, forget, and improve operations.

How topoteretes/cognee works

Input enters through Cognee's ingestion and API operations, including remember, recall, forget, and improve. Cognee builds a self-hosted knowledge graph while using vector embeddings to support meaning-based search and graph relationships to connect information. The cognee directory holds the main Python implementation. The cognee/infrastructure/session/session_manager.py file manages sessions, while cognee/modules/migrations/runner.py runs migrations. Graph database access is implemented in cognee/infrastructure/databases/graph/ladybug/adapter.py and cognee/infrastructure/databases/graph/postgres/adapter.py. The cognee-frontend directory provides the frontend modules, and cognee-mcp contains the MCP server components.

The codebase has 2,262 files and 13,146 symbols in 15 modules, led by Python, TypeScript and JavaScript. Code health is 6.6 out of 10, rated fair.

Getting started with cognee

  1. Install Cognee with a Python package manager.
    uv pip install cognee
  2. Configure the language model API key.
    os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY"
  3. Store information and recall it with the Cognee CLI.
    cognee-cli remember "Cognee turns documents into AI memory."
  4. Open the local user interface.
    cognee-cli -ui

Commands copied from the README

topoteretes/cognee FAQ

What is cognee?

cognee is an open-source AI memory platform for agents. It gives agents persistent long-term memory across sessions through ingested data and a self-hosted knowledge graph.

How does cognee work?

cognee ingests data, builds a self-hosted knowledge graph, and combines vector embeddings with graph reasoning. Its operations include remember, recall, forget, and improve.

How do I install cognee?

You can install cognee with uv using the command uv pip install cognee. Configure LLM_API_KEY before running the pipeline.

What language is cognee written in?

cognee is primarily written in Python. The repository also includes TypeScript, JavaScript, shell, and Dockerfile code.

How is the cognee code organized?

cognee's main implementation is in the cognee directory, with frontend code in cognee-frontend and MCP components in cognee-mcp. The repository also includes examples, evals, distributed, and root modules.

Who is cognee for?

cognee is for AI agents that need persistent long-term memory across sessions. It supports company knowledge, cross-agent knowledge sharing, and context management.

What license does cognee use?

cognee uses the Apache-2.0 license.

The summary, features and answers on this page are written by a model from the README and the source, and refreshed with each index.

About this page

Get a page like this for your own codebase

Repowise built this map of topoteretes/cognee from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.

Index your repo freeSee how Repowise worksFree for 2 public repos, with a page like this one.

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.