SuperAPIAI Directory

cognee

github.com · AI coding

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.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Cognee is a free and open-source AI memory platform that provides AI agents with persistent long-term memory across sessions. It transforms documents, code, and conversations into a self-hosted knowledge graph that agents can search and reuse. The project can run locally for free, without API keys, relying on free small models that use the CPU.

Uses

  • Build a "company brain": bring documents, conversations, tickets, code, and agent work into shared memory, helping teams and agents connect decisions with the discussions and implementations behind them.
  • Provide agents with memory across runs: preserve project context, past decisions, fixes, and learned rules, distilling useful session experience into persistent knowledge that can be retrieved by other sessions.
  • Ground agents in a specific domain: organize memory around the entities and relationships an application needs, with support for custom data models and ontologies.

Main capabilities

  • Build associative memory from different sources: text is transformed into entities, relationships, and searchable fragments; code is transformed into a graph of symbols and dependencies; session distillation organizes accepted lessons into permanent memory.
  • Retrieval at query time: select relevant graph, vector, or code context, and apply inspectable retrieved evidence to answer questions or continue agent tasks.
  • Local workflows without an LLM key: when no LLM key is configured, Cognee uses a local GLiNER model to extract the graph and a local embedding model for embeddings, both of which are downloaded on first use. Text ingestion, retrieval, and session storage work without an LLM, and improvement stages that depend on an LLM are automatically skipped. Generating answers and media processing that requires vision or transcription models require additional LLM configuration.
  • Optional LLM configuration: after setting a key, Cognee uses OpenAI's language models and embeddings, and processing and answer generation call the provider. Other providers or local Ollama models are also supported.
  • Agent integrations: provides a Claude Code plugin and a Codex plugin, as well as integration repositories for agent frameworks, plugins, and source connectors.
  • Local UI: the local installation can be inspected through the UI; the UI launcher requires Node.js/npm, and its MCP service requires Docker.
  • Memory import: supports importing memory from Mem0, Letta, Zep, or Graphiti using the COGX exchange format.
  • Run the entire memory layer on a single Postgres: since cognee 1.0, the entire memory layer can run on a single Postgres instance. Note: placing Postgres is currently released as a demonstration feature when used as graph storage; the production-ready version is a licensed product.

How to use

  • Environment requirements: Python 3.10–3.14.
  • Installation: Install Cognee using pip, uv, or your preferred Python package manager. The gliner add-on provides the local extraction model used when no LLM key is configured.
  • Build and query memory: Save the example as quickstart.py and run python quickstart.py, or have an LLM execute it. The same workflow is also available through the CLI.
  • Explore the built-in demo: This command works with the basic pip install cognee package, loads built-in sample data, and runs keyword search without an API key.
  • Configure an LLM: Add an LLM to get generated answers instead of retrieved passages; you can also use the template to create a .env file.
  • Connect agents: Install the Claude Code plugin or Codex plugin (hooks must be enabled first), then add the marketplace and plugin, and configure local or remote memory according to the plugin setup guide.
  • Run the API: You can run the prebuilt API with Docker Compose, or use the deployment template. ENABLE_BACKEND_ACCESS_CONTROL=false is a single-user/local posture; when not set, the API defaults to multi-tenant mode, and every /api/v1 call requires an authenticated user. --rm discards container-local data on exit, while using the named volume -v cognee_storage:/cognee-storage preserves memory across runs.
  • Run the API, UI, and MCP server from source: Clone the repository, enter the directory, copy .env.template to .env and configure the provider, then run. The default ports are API 8000, UI 3000, and MCP 8001.
  • Docker image: The cognee/cognee image has a built-in GLiNER runtime, so text ingestion and retrieval can be done in Docker without an LLM key; local extraction and embedding models are downloaded on first use. Set LLM_API_KEY when generated answers are needed.

Use cases

  • Team knowledge management: Integrate documents, conversations, tickets, code, and agent work into shared memory.
  • Long-term memory for agents: Preserve project context,decisions, fixes, and rules across runs.
  • Domain knowledge grounding: Organize memory around custom entities and relationships.
  • Local or self-hosted deployment: Run locally without an API key, or deploy with Docker.

Limitations

  • Without an LLM, generated answers and media processing that requires vision or transcription models are unavailable.
  • The built-in GLiNER extractor is a demonstration of a small-model pipeline; the production-ready version has higher accuracy and broader label coverage, and you need to contact the project team.
  • Using Postgres as graph storage is currently a demonstration feature; the production-ready version is a licensed product.
  • The local UI launcher requires Node.js/npm, and its MCP service requires Docker.
  • Benchmark results use specific data formats, prompts, and retrieval configurations; before comparing, read the methodology, models, limitations, and reproduction instructions.
  • More information about fees, pricing, and the scope of specific platform support is not yet provided in the materials.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools