# topoteretes/cognee

> cognee is an open-source AI memory platform for AI agents that gives them persistent long-term memory across sessions. It ingests data in any format and continuously builds a self-hosted knowledge graph from it, so agents can recall what they have learned. The project is written mainly in Python.

Source: https://github.com/topoteretes/cognee
Indexed: commit 6df1eda on 2026-07-19 by Repowise. Facts come from the source and git history, not from the maintainer.

## Facts

- Type: MCP server
- Language: Python
- Stars: 33,331 at index time
- License: Apache-2.0
- Code health: 6.7/10, Fair
- Last commit: 2026-07-17
- Contributors: 230

## Install

From the README: https://github.com/topoteretes/cognee#quickstart

Install cognee as a Python package with uv. The README lists Python 3.10 to 3.14 as the prerequisite.
    uv pip install cognee

Store a first piece of text in memory with the command line interface.
    cognee-cli remember "Cognee turns documents into AI memory."

Open the local UI. This needs Docker Desktop, Colima, or another OCI-compatible runtime with a working docker CLI.
    cognee-cli -ui

## How it works

The cognee directory is the largest module and holds the core Python package that ingests data and builds the knowledge graph. Graph storage is implemented through database adapters such as cognee/infrastructure/databases/graph/postgres/adapter.py, and session handling lives in cognee/infrastructure/session/session_manager.py. The README says the core work combines vector embeddings with graph reasoning, so stored memory can be searched by meaning and by relationships. Users reach this memory through the cognee-cli commands remember, recall, forget and improve, or through the API server. The cognee-frontend directory holds the web UI for the local interface, and the cognee-mcp directory holds the MCP server, which the README says runs inside a Docker container when started with cognee-cli -ui.

- cognee-frontend/src/modules/analytics/index.ts: entry point
- cognee-frontend/src/modules/local/index.ts: entry point
- cognee-frontend/src/ui/app/index.ts: entry point
- cognee-frontend/src/ui/elements/Auth/index.ts: entry point
- cognee-frontend/src/ui/elements/Modal/index.ts: entry point
Modules: cognee, cognee-frontend, examples, evals, .github, distributed, cognee-mcp, root. 2,262 files, 254,682 lines, 13,146 symbols.

## Code health

- Score: 6.7/10 (Fair)
- Rank: #174 of 4,000+ indexed repos
- Hotspots: cognee/infrastructure/session/session_manager.py, cognee/modules/migrations/runner.py, cognee/infrastructure/databases/graph/ladybug/adapter.py, cognee/infrastructure/databases/graph/postgres/adapter.py, cognee/infrastructure/databases/utils/closing_lru_cache.py
- Lowest file: cognee/infrastructure/databases/graph/ladybug/adapter.py
- Dead code: 145 findings

## Maintenance

- Last commit 2026-07-17, first commit 2023-08-16, 8,709 commits
- 230 contributors, bus factor 4

## Security

- Security findings are shown to signed-in users at https://repowise.dev/repo/topoteretes/cognee/security

## More

- Page: https://repowise.dev/repo/topoteretes/cognee
- Ask this codebase: https://repowise.dev/repo/topoteretes/cognee/chat
- Docs: https://repowise.dev/repo/topoteretes/cognee/docs
- MCP (signs in with Repowise on first use):
    claude mcp add --transport http repowise https://api.repowise.dev/mcp/topoteretes/cognee
