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.
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
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.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.Paste the server URL below as the Remote MCP server URL, then click Add.
- 3.Click Connect. A Repowise sign-in window opens. Approve access.
- 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.
Docshttps://api.repowise.dev/mcp/topoteretes/cognee
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
- DocumentationModule-by-module documentation, written from the source.
- ArchitectureDependency graph, layers and third-party dependencies.
- Code healthEvery file's score and the findings behind it.
- CommitsEach commit's effect on code health.
- OverviewEverything else the index found: contributors, decisions, what changed this week.
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
- Install Cognee with a Python package manager.
uv pip install cognee - Configure the language model API key.
os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY" - Store information and recall it with the Cognee CLI.
cognee-cli remember "Cognee turns documents into AI memory." - 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.
Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.
Maintain topoteretes/cognee?
Claim this page, add a badge to the README, or re-index it.
Claim this page
Sign in with GitHub and we check that you are an admin or maintainer of topoteretes/cognee. Then add a badge to the README that links readers here.
Add a badge to your README
Every badge is public, cached, and updates on its own after every index. Nothing to install.
Repowise badge
Links to this page, with no score on it. Adding it also re-indexes the repo every week.
[](https://repowise.dev/repo/topoteretes/cognee?src=badge_wiki)Code health badge
The repo's health score out of 10, from the latest index.
[](https://repowise.dev/repo/topoteretes/cognee?src=badge_health)Code health card
A larger card with the score, its change since the last index, and when it was measured. The HTML version follows the reader's light or dark theme.
[](https://repowise.dev/repo/topoteretes/cognee?src=badge_card)