TopGit
GitHub Repo Review

Cognee: Open-Source AI Memory Platform for Agents

topoteretes/cognee
CTopGit review image for topoteretes/cognee
Review by Topgit.dev for topoteretes/cognee, with GitHub repository stats and README context.
Quick verdict

Cognee gives AI agents memory that persists between sessions without requiring manual wiring of a graph database, vector store, and session cache, simplifying the setup for teams. Its Postgres integration is a genuine productivity win for development, though the real production path requires a graph-native backend. Consider Cognee if you need a pre-assembled memory layer for your agent.

Stars
โ˜… 32.2k
Forks
โ‘‚ 3.4k
Contributors
๐Ÿ‘ฅ 279
Language
Python
License
Apache-2.0
Topic
AI Tools
Updated
Oct 2026

What is Cognee?

Cognee is an open-source AI memory platform designed for agents to remember across sessions, ingesting documents to extract and store entities and relationships as a searchable knowledge graph. Backed by vector embeddings, it uses four API calls (remember, recall, forget, improve) for information storage, querying, deletion, and memory tuning. The platform runs locally, in Docker, or as a managed cloud service, and ships official clients for Python, Rust, and TypeScript.

Core Capabilities for Agent Memory

  • โœ“Four-operation API: remember, recall, forget, and improve for full memory lifecycle management
  • โœ“Hybrid storage combining vector embeddings with graph relationships for meaning-based and structure-based retrieval
  • โœ“Session memory with background sync to the permanent knowledge graph
  • โœ“Claude Code plugin that captures prompts, tool traces, and responses into session memory and persists context across context resets
  • โœ“Multi-backend architecture: LanceDB, Postgres/pgvector, Neo4j, Qdrant, ChromaDB, Weaviate, Milvus, and more via community adapters
  • โœ“Multi-tenant isolation support with per-user, per-dataset graph and vector databases on compatible backends
  • โœ“Docker images for the API server and MCP server published on Docker Hub on every push to main
  • โœ“Benchmark results on the BEAM long-context benchmark: 0.79 at 100K tokens, 0.67 at 10M tokens
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history โ†—

Real-World Applications of Cognee

  • โ€ขBuilding customer support agents that track interaction history, failed actions, and resolved cases across sessions
  • โ€ขCreating SQL copilots that distill and reuse expert-level query patterns and reasoning
  • โ€ขUnifying data from multiple company channels into a single knowledge graph that any agent can query
  • โ€ขGiving Claude Code persistent memory that survives context resets and session boundaries
  • โ€ขRunning an AI research assistant that maintains a growing ontology of papers, concepts, and their relationships
  • โ€ขBuilding domain-specific expert systems where agents learn from feedback and improve over time

Benefits of Using Cognee

  • โœ“Self-hosted option means no vendor lock-in and no data leaving your infrastructure
  • โœ“Runs the entire memory stack on Postgres during development, reducing the number of services to manage
  • โœ“Graph-backed memory preserves relationships between facts, not just similarity
  • โœ“Official Rust and TypeScript clients extend the platform beyond Python-only projects
  • โœ“Multi-tenant isolation available for graph and vector layers on compatible backends
  • โœ“Active development with a published research paper backing the architecture decisions

Current Considerations and Trade-offs

  • โ–ณThe Postgres graph backend is explicitly a demo feature; production graph workloads need a graph-native database
  • โ–ณMulti-tenant isolation requires specific backends for both graph and vector layers; misconfiguration or unsupported backends will raise an error
  • โ–ณThe `AUTO_FEEDBACK` post-query tuning step adds latency to every read; it cannot be selectively applied per query
  • โ–ณNo offline mode documented; the LLM integration is a hard dependency for memory improvement and ontology generation
  • โ–ณDocker Desktop or an OCI-compatible runtime is required for the local UI, which may surprise developers expecting a CLI-only tool
View on GitHub โ†—Homepage โ†—

Getting Started with Cognee

Install via pip, uv, or poetry. Python 3.10 to 3.14 is required. Run `uv pip install cognee` for the core package, or add `[postgres]` for the Postgres stack. Configuration is done through environment variables: set `LLM_API_KEY` for the language model, then point at your chosen backends with variables like `DB_PROVIDER`, `VECTOR_DB_PROVIDER`, and `GRAPH_DATABASE_PROVIDER`. A `.env.template` in the repo shows all available options. Docker users can pull `cognee/cognee:main` directly from Docker Hub or use the provided docker-compose file with optional profiles for the UI, MCP server, Postgres, and Neo4j.

Integrating Cognee into Your AI Agents

Import cognee in your async Python code and call the four operations. `await cognee.remember("your text here")` stores permanently in the knowledge graph. Pass `session_id` to route through session cache instead. `await cognee.recall("your query")` queries with automatic routing to the best retrieval strategy. `await cognee.forget(dataset="name")` deletes a dataset. Environment flags let you trade off memory quality for speed: `AUTO_FEEDBACK=false` disables the post-query self-tuning step, and `CACHING=false` disables session memory entirely. The CLI offers the same operations with `cognee-cli remember`, `cognee-cli recall`, and `cognee-cli forget --all`.

Exploring AI Agent Memory Solutions

MemGPT โ€” memory-focused agent framework with a different architecture focused on hierarchical memory managementLangChain Memory โ€” integrates with the broader LangChain ecosystem but lacks a native graph reasoning layerNeo4j + Vector Index โ€” assembling these yourself gives production-grade graph storage but requires significantly more setup than Cognee's unified APIHaystack โ€” open-source NLP framework with memory components but oriented toward search pipelines rather than agent memory

Common Questions About Cognee

Is Cognee an open-source project?

Yes. Cognee is released under the Apache-2.0 license. The repository, documentation, and source code are publicly available on GitHub.

What programming languages does Cognee support?

The primary client is Python. Cognee also ships official clients for Rust (cognee-rs) and TypeScript (@cognee/cognee-ts), both available as separate repositories and published packages.

Can Cognee be self-hosted or deployed to the cloud?

Both. You can self-host using Docker, Docker Compose, Modal, Railway, Fly.io, or Render with provided deployment scripts. Cognee Cloud offers a fully managed option. You can also connect any Python agent to a remote Cognee instance using cognee.serve(url, api_key).

Does Cognee support multi-tenant deployments?

Yes, with caveats. With ENABLE_BACKEND_ACCESS_CONTROL enabled, each user-dataset combination gets isolated graph and vector databases. Both layers must support isolation: compatible backends include Ladybug, Kuzu, and Neo4j for graphs, and LanceDB and PGVector for vectors.

What types of databases can Cognee integrate with?

Cognee supports multiple backends across three layers. Graphs: Ladybug, Kuzu (defaults), Neo4j, Neptune, Postgres (demo). Vectors: LanceDB (default), PGVector, Qdrant, ChromaDB, Weaviate, Milvus, plus community adapters. Sessions: Redis, Postgres, or SQLite.

Is the Postgres graph store in Cognee production-ready?

No. The README explicitly marks the Postgres graph backend as a demo feature. The relational, vector, and session layers on Postgres are production-ready; the graph functionality on Postgres is not. Production graph workloads require a graph-native backend like Neo4j.

The problem it solves

Agent frameworks give you tools to think and act, but nothing remembers what happened last week, last month, or last quarter. Vector stores solve the retrieval problem but lose the relationships between facts. Rag systems need to be rebuilt for every session. Developers end up hand-rolling brittle context windows, losing the long-term learning that makes an agent actually useful over time.

Who should try it โ€” and who should skip

Reach for Cognee if you are building a multi-session AI agent and you do not want to assemble a memory stack from a vector store, a graph database, and a session cache. It is particularly useful for Python or TypeScript teams that want a self-hosted option with a research-backed architecture. The Postgres-integration makes it practical for solo developers and small teams who want a single-service memory layer during development. Skip it if your agents do not need persistent cross-session memory, if you are already invested in a different agent framework with its own memory system, or if you need production-grade graph isolation today and cannot wait for the managed offering.

Related repositories

Source & attribution

Repository: https://github.com/topoteretes/cognee โ€” Apache-2.0 licensed, primary language Python

GitHub data ยท last synced Aug 22, 2026Reviewed by Henry
โ† Back to TopGit

Is cognee worth your time?

ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of cognee.

GitHub