← Back to Leaderboard
Ctopoteretes

topoteretes/cognee

Graph and vector retrieval for persistent agent memory across sessions

Engineering Health (Methodology)
A+ · 98/100
Maintenance Activity
● Updated today
Latest Release
v1.6.11
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedLocal AIMCPCLIAPI
Total Stars
★ 33,829
24h Growth
+13
7d Growth
+174
Forks
3,597

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

topoteretes/cognee Star History (2023-08-16 - 2026-12-04) ALL-TIME STAR HISTORY (2023-08 – 2026-12) +33.8k in 1206d · avg +28/day 35.7k 17.9k 0 2023-08-16: ★ 12023-10-28: ★ 272024-01-13: ★ 872024-03-30: ★ 3672024-06-15: ★ 6832024-08-31: ★ 7612024-11-16: ★ 8472025-02-01: ★ 1,0582025-04-19: ★ 1,9062025-07-05: ★ 5,8952025-09-20: ★ 6,8412025-12-06: ★ 9,7652026-02-21: ★ 12,1712026-05-09: ★ 16,8812026-07-25: ★ 28,7222026-10-10: ★ 31,7422026-12-04: ★ 33,829 ★ 33.8k 2023-08 2025-04 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Cognee is a Python memory layer that builds and queries indexes rather than just exposing a database API. Text ingestion produces entities, relationships, and searchable chunks; code ingestion maps symbols and dependencies. remember writes to durable memory or to a session when given a session ID. improve applies feedback and can promote curated session knowledge into the graph, while recall selects context through automatic routing or an explicit search strategy.

The package targets Python 3.10–3.14 and declares openai, pydantic, and python-dotenv as dependencies. Python, REST, CLI, and MCP provide distinct integration surfaces; plugins connect existing agent clients, while custom data models and ontologies shape extraction around application-specific entities. The tree separates cognee/, cognee-mcp/, cognee-connectors/, and cognee-integrations/.

Key Capabilities & Differentiators

The local text path uses GLiNER for extraction and a local embedding model for indexing. Without a generative LLM, Cognee can ingest text, store sessions, and return matching source passages; LLM-dependent improvement stages skip automatically. Configure a local or hosted model for generated answers, and configure the relevant vision or transcription model for media that requires it. Ollama is a documented local option. forget supports item- or dataset-level removal, and COGX can import memory from Mem0, Letta, Zep, and Graphiti.

The BEAM results are 0.79 at 100K tokens and 0.67 at 10M tokens. The 100K run used fixed hybrid retrieval over 20 questions from one held-out conversation across four rounds. The 10M run averaged five rounds and selected and scored question-type routing on the same question set. Different conversations, ingestion models, and retrieval procedures make these unsuitable as a scaling curve; the distributed 10M ingestion still has a reproduction gap.

Trade-offs & Limitations

Compared with a vector-only RAG stack, Cognee is a better fit when queries need relationships across sources, code dependencies, or lessons from earlier agent sessions. The cost is extra extraction and indexing work, plus a second source of retrieval error: a missed entity or incorrect edge can weaken graph retrieval even when the original passage was indexed. The bundled GLiNER extractor is a demo with limited label coverage relative to the production offering, so test it on domain terminology before committing to it.

CPU inference avoids sending text to a hosted model in the local path, but moves model preparation, throughput planning, and capacity costs onto your infrastructure. The single-PostgreSQL setup can colocate relational metadata, PGVector embeddings, and graph state for a demo. Do not plan a production rollout around that consolidation without licensing the production graph implementation or qualifying another supported backend. The repository's Apache-2.0 license does not cover the separately licensed implementation.

Hardware & Deployment Guide

For a local Python pilot, install cognee[gliner] on Python 3.10–3.14 and allow the extraction and embedding models to download on first use. The Docker image includes the GLiNER runtime, not the downloaded models. The prebuilt Compose setup is the shortest path to a persistent API demo. From a source checkout, configure .env from .env.template and run docker compose --profile ui --profile mcp up; the defaults are API 8000, UI 3000, and MCP 8001.

For shared deployments, retain authentication rather than using the local-only ENABLE_BACKEND_ACCESS_CONTROL=false setting, and configure persistent storage and compatible backends. The source Compose file mounts /cognee-storage/system and /cognee-storage/data; if you change BACKGROUND_DRAIN_TIMEOUT_SECONDS, adjust the container stop grace period to leave time for engine close and WAL checkpointing. Provision CPU, RAM, and disk against measured ingestion and query concurrency. v1.6.10 tightened PostgreSQL pooling; v1.6.11 focused on retrieval and ingestion and added a Granola connector.

Memory lifecycle: remember, recall, improve, and forget cover ingestion, retrieval, session curation, and targeted deletion.
Retrieval routing: Choose a search strategy explicitly or let Cognee route among graph, vector, and code context.
Local runtime: cognee[gliner] supports CPU-based extraction and local embeddings without an LLM key; models download on first use.
Integration: Python, REST, CLI, and MCP expose memory to applications and agent clients; COGX supports imports from four named memory platforms.
Storage boundary: PostgreSQL can hold metadata, PGVector embeddings, and graph state in the demo; the production graph implementation is separately licensed.
Container operations: Compose separates system and data volumes and sets a 15-second shutdown grace period against a default 8-second background drain plus engine close and WAL checkpoint work.
Best For

Teams building persistent agent memory or an internal knowledge system where document relationships, code dependencies, and lessons from prior sessions need to be retrieved together.

Skip If

Passage similarity is sufficient, you cannot maintain extraction and indexing pipelines, or you require a production all-in-one PostgreSQL graph stack under Apache-2.0 alone.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedLocal AIMCP
uv pip install "cognee[gliner]"

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
cognee ★33.8k+174PythonApache-2.0Graph and vector retrieval for persistent agent memory across sessions
hindsight64.7k+884PythonMITA bank-based memory service that turns agent interactions into durable knowledge
Memori17.9k+337Python—An SDK-based agent memory layer for persistent state across sessions.
OpenViking43.2k+255PythonAGPL-3.0A directory-scoped RAG database for inspectable agent knowledge and memory

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/topoteretes/cognee.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

topoteretes/cognee Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about cognee

How should I connect an existing agent to Cognee?

Use the Python API when your application owns the memory lifecycle, REST when you want a separate service, and MCP when your agent client already supports it. Use remember to write content and recall to query selected datasets. If you supply a session ID, the write goes into session memory; use improve to curate useful session knowledge into durable memory.

Does Cognee require a GPU, and what should I measure to size it?

The no-key text workflow runs local GLiNER extraction and local embeddings on CPU; it does not require a GPU. The models download on first use, so prepare them before running in a restricted network. Measure indexing time, peak RAM, storage growth, and concurrent query performance on representative data. If you add a local generative LLM, size RAM or VRAM separately for the model and concurrency you choose.

Can we self-host Cognee commercially under Apache-2.0?

The repository is Apache-2.0 licensed and can be self-hosted, including for commercial use, subject to the license terms. That does not include rights to the separately licensed production PostgreSQL graph implementation: the open PostgreSQL graph path is a demo. Review model and provider terms separately, and verify authentication and data-handling requirements for your deployment.

When should I choose Cognee over a vector-only RAG stack or another agent memory layer?

Keep a vector-only stack if your main task is finding similar passages and your application already handles ingestion and memory lifecycle. Evaluate Cognee when entity relationships, code dependencies, or reusable session lessons are important to retrieval. COGX offers an import path from Mem0, Letta, Zep, and Graphiti, but an import alone does not establish equivalent retrieval behavior.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining topoteretes/cognee? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature topoteretes/cognee on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare