cognee

topoteretesApache-2.0活跃维护

给 AI Agent 提供持久化长期记忆的开源平台,用小型模型即可免费搭建,解决智能体跨会话记不住上下文的问题。

Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory with small models for free

v1.6.7发布于 2026-11-06 17:15 UTC33,219star +92 / 7 天3,497fork同步于 2026-11-10 17:21 UTC

怎么上手

由 README 提炼,执行前请确认
uv pip install "cognee[gliner]"
硬件要求按 README 说明

README 说明可完全本地免费运行、无需 API key,依赖使用 CPU 的小模型;未提及显存或 GPU 型号要求。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源 AI 记忆平台,把文档、代码和对话变成可检索的自托管知识图谱,给 Agent 持久长期记忆

给 AI Agent 提供持久化长期记忆的开源平台,用小型模型即可免费搭建,解决智能体跨会话记不住上下文的问题。

核心能力

  • 用 remember/recall/improve/forget 四个操作管理记忆
  • 把文本抽取成实体关系与可检索片段,代码转成符号依赖图
  • 无 LLM 时用本地 GLiNER 抽取加本地嵌入模型建图
  • recall 自动路由或指定图、向量、代码检索策略
  • 提供 Claude Code、Codex、MCP 等插件接入现有 Agent

容易踩的坑

首次使用会下载本地 GLiNER 抽取模型和嵌入模型;生成式回答和图像/转写处理需额外配置 LLM key;cognee-cli -ui 需要 Node.js/npm,其 MCP 服务需要 Docker。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.6.7
  1. v1.6.7最新正式版2026-11-06 · 2026-11-06 17:15 UTC

    v1.6.7

    Release Date: 2026-11-06 Changes: v1.6.6rc1 → v1.6.7

    Pull Requests: #6266, #6337, #6338, #6339, #6340, #6342, #6392, #6404, #6493, #6512, #6540, #6546, #6550, #6564


    Summary

    This release tightens ingestion safety and improves how search and retrieval behave and perform. You’ll see stricter safeguards when giving the system file or database connection info, more correct scoped searches (queries that target a specific document type or namespace), and faster, more efficient scoring for vector searches.

    Highlights

    • Safer ingestion: raw database connection strings and unsafe server/file paths are refused by default, reducing risk of accidental credential or server exposure.
    • Search and recall correctness: typed/scoped queries (queries targeted at a specific document type or scope) now return correct, LLM-safe results and "feeling lucky" picks ignore disabled data types.
    • Retrieval performance: query scoring is much faster for PGVector, Turso and LanceDB backends by batching and parallelizing scoring work.
    • Various robustness fixes: fixes for LanceDB compaction/migration, graph upserts, session/forget operations, and export headers for SDK users.

    Breaking Changes

    • Stricter ingestion defaults for databases and remote paths: raw database connection strings and server file paths over HTTP are refused by default. Impact: workflows or connectors that previously ingested such connection strings will start failing ingestion. Action: review your ingestion configuration and explicit opt-in controls in the docs to allow these sources if you intentionally use them.
    • ACCEPT_LOCAL_FILE_PATH now also gates s3:// inputs: if you relied on previously permissive behavior for s3:// URIs, you may need to set ACCEPT_LOCAL_FILE_PATH or follow the documented opt-in to re-enable those inputs. Check the ingestion API docs for details.

    New Features

    • Column graph anchors (DLT): Adds a new column to the ledger/graph storage that stores "graph anchors" (small pointers that help link table rows back into the graph). What it does: records anchor information on column writes so graph queries and downstream processes can reference those rows more reliably. Why it matters: improves correctness and traceability for workflows that rely on graph-backed columns and ledger reconciliation.

    Improvements

    • Stricter and clearer ingestion handling: the ingestion messaging was simplified, and the system now has a single refusal rule for unsafe network or database connection inputs so it’s easier to understand why a file or connection was rejected. Why it matters: fewer accidental ingestions of sensitive connection strings or remote paths.
    • Separated routing constraints for scopes and LLMs: the code that decides which documents to route to a language model (LLM) and which to route by scope (document type or namespace) was refactored into distinct rules. What it does: makes scoped searches and LLM routing behavior clearer and more predictable. Why it matters: improves correctness when you target only specific document types or want to keep some searches LLM-free.
    • Search and recall scope handling: typed scopes (queries that say "only search documents of type X") are now honored consistently in chunk searches and quoted/scoped queries, and those same quoted phrases avoid unnecessary LLM routing. Why it matters: scoped queries return more accurate, expected results and avoid extra LLM calls.
    • Correct error codes for file ingestion: requests that are forbidden now return 403 with a helpful message instead of 415. Why it matters: clearer error handling helps operators diagnose permission and gating problems faster.
    • Keep OMP headers on SDK exports: when exporting SDK artifacts (used by Cognee X / SDK flows) OpenMP-style headers are preserved. Why it matters: avoids losing configuration/metadata during SDK export workflows.

    Performance

    • Batch scoring across backends: PGVector and Turso now score a whole batch of que
  2. v1.6.6v1.6.6 — Conflict resolution & stability2026-10-29 · 2026-10-29 21:33 UTC
    查看更新说明

    v1.6.6 — Conflict resolution & stability

    Release Date: 2026-10-29 Changes: v1.6.6rc1 → v1.6.6

    Pull Requests: #6266, #6337, #6339, #6340


    Summary

    This release focuses on making conflict handling more reliable and easier to manage, plus a handful of stability, vector, and data-layout fixes. You’ll find a new durable conflict-resolution API, safer retirement of conflicting choices, faster and safer cache/deletion paths, and improvements to vector handling that save re-embedding work.

    Highlights

    • New durable API for fact conflict resolution so you can resolve data disagreements reliably from the API.
    • Conflict review is enabled by default and many fixes ensure 'choices' (user decisions about conflicting facts) are retired correctly on edits, deletes, and rebuilds.
    • Copy stored vectors between vector stores without re-embedding to save time and cost when moving/replicating embeddings.
    • Safer deletion and caching: Redis list/context deletions are now atomic or in-place, and permission/KMS errors are surfaced so failures won’t be silently ignored.

    New Features

    • Durable fact conflict resolution API — A new API endpoint that lets you resolve disagreements between conflicting facts in a durable (persistent) way. What it does: records and applies chosen resolutions so the system consistently uses the resolved fact. Why it matters: resolves data inconsistencies reliably across sessions and components, reducing incorrect answers or surprising behavior from stale/conflicting data.
    • Default conflict review workflow — The system now reviews conflicts by default (previously optional). What it does: when the system detects conflicting facts (different sources or versions of the same information), it surfaces them for review automatically. Why it matters: makes conflict detection actionable out of the box, so fewer conflicts slip through and searches/agents return cleaner results.
    • Copy stored vectors between stores without re-embedding — You can now move or copy vector embeddings from one vector store to another without re-running the embedding model. What it does: performs a direct copy of stored embeddings. Why it matters: speeds up migration and replication, and reduces compute and cost because models aren’t re-called.
    • DLT column and dated-cell representation improvements — Every DLT column (a column used in change-tracking tables) is now treated as a value node by default, and dated cells are represented once as a Timestamp value. What it does: makes the platform treat change-tracking columns as concrete values and avoids duplicating date cells. Why it matters: fixes subtle correctness and duplication issues when reading dataset rows and keys, improving accuracy of reads and downstream processing.

    Improvements

    • Safer retirement of choices (user decisions about conflicting facts) — Choices are retired at the correct times: on chunk edits, connector deletes, dataset forget operations, and when rebuilds would otherwise lose them. This reduces stale decisions lingering after data changes.
    • Fail-fast on invalidation and malformed keys — Editing will fail if invalidation of related state fails; malformed hints for DLT keys now raise an error instead of silently skipping them. This prevents silent data inconsistencies.
    • Preserve retrieval context when resolving conflicts — The retrieval context used to fetch supporting evidence is now preserved while resolving conflicts so answers remain grounded in the same context.
    • Merge and validate tags before writing vectors — Tags are now merged and validated before vector upserts, avoiding broken or incomplete metadata on vector records.
    • Finish multi-session stamp rollout — Session stamps (used to track actions across sessions) are now rolled out consistently across components for improved session handling and correctness.
    • Make classify() accept plaintext view of sealed objects — Useful when you need to classify contents of encrypted/sealed objects a
  3. v1.6.6rc1v1.6.6rc1 — History controls, connectors, and sync hardening2026-10-23 · 2026-10-23 01:46 UTC
    查看更新说明

    v1.6.6rc1 — History controls, connectors, and sync hardening

    Release Date: 2026-10-23 Changes: v1.6.5.dev0 → v1.6.6rc1

    Pull Requests: #5765, #5850, #5893, #5898, #5938, #5955, #5958, #5961, #6011, #6013, #6014, #6185


    Summary

    This release focuses on giving users clearer, safer controls over memory & search history, adding several new connectors, and hardening sync reliability. Key workflow changes include explicit history-purging behaviour, a new flag to remove search history from the CLI/API, and fixes that make Drive/Asana synchronisation and indexing more robust.

    Highlights

    • New forget(clean_history=True) option so you can remove search history without needing other inputs.
    • Users can now delete their own search history via the API and server endpoints.
    • New connectors: Obsidian (vaults), Asana (tasks) and OneNote are added and their syncs are hardened.
    • Reliability improvements: Drive and Asana syncs are faster and resumable; graph and index operations avoid unnecessary work.

    Breaking Changes

    • Dataset delete now purges associated search and conversation history: When you delete a dataset, all associated history is removed. Action required: if you depend on preserved search or session traces for backups or audit, export or back them up before deleting datasets.
    • run_info structure changed: run_info metadata no longer contains the full 'data' items that ingestion pipelines previously stored. Action required: any code or tooling that read run_info expecting embedded data must be updated to instead fetch original items via their data ids or use the new storage shapes. A migration to remove the old data shape is included in this release.
    • Fail-on-history-purge: delete/forget operations that attempt to purge history will now fail if the purge cannot be completed. Action required: ensure the service has permission to delete search history and that long-running purge operations are allowed to complete; handle failures when calling delete APIs.
    • Budget/quota errors: Budget exhaustion and payment-required errors are raised more consistently (LLMPaymentRequiredError). Action required: clients should catch and handle these exceptions if they interact with LLM billing paths.

    New Features

    • Forget(clean_history=True): A new clean_history flag for the forget command and API that lets you purge recorded search history while keeping other deletion behaviour. What it does: call forget(clean_history=True) to remove stored search history related to a dataset or user. Why it matters: you can now remove traces of user searches without performing other delete operations, making privacy and cleanup operations clearer and easier.
    • Delete your own search history: The server and API now include a route that allows a user to delete their own search history. What it does: end-users (via API or UI) can remove their personal queries and search metadata. Why it matters: improves user privacy and compliance by giving individuals direct control over their search traces.
    • Obsidian connector (vaults): A new connector that ingests Obsidian vaults (local notes and markdown vaults). What it does: lets you import notes stored in Obsidian vaults into Cognee so they become searchable and recallable. Why it matters: broadens supported sources so personal knowledge stored in Obsidian can be included in memory and search workflows.
    • Asana connector: A first-class Asana connector for tasks and events. What it does: syncs Asana tasks and events into Cognee and makes them available for search and recall. Why it matters: teams using Asana can now include task context and history in their memory-driven workflows.
    • OneNote connector: Add OneNote support for ingestion and sync. What it does: pulls OneNote content into Cognee so notebooks are searchable and linked into memory. Why it matters: integrates another major note-taking source so users' OneNote content participates in memory and search.
    • Expose dataset and data id
  4. v1.6.5v1.6.5 — Faster trace processing & richer code-graph docs2026-10-16 · 2026-10-16 20:10 UTC
    查看更新说明

    v1.6.5 — Faster trace processing & richer code-graph docs

    Release Date: 2026-10-16 Changes: v1.6.4 → v1.6.5

    Pull Requests: #5287, #5534, #5620, #5622, #5720, #5721, #5722, #5725, #5726, #5751, #5798, #5898, #5938, #5955, #5958, #5961


    Summary

    This release speeds up trace and ingestion pipelines, improves session handling, and makes code documentation searchable inside the code graph. It also adds a new memify API, better embedding compatibility (base64), and several security and connector hardenings.

    Highlights

    • Faster trace processing: traces are persisted and processed in fewer, larger operations for lower latency and fewer database writes.
    • Code-graph docstrings: function/class docstrings are stored as graph documents and linked to code symbols for better code recall and search.
    • New Memify API endpoints: convert content into memory entries via the API to make ingestion and downstream recall simpler.
    • Base64 embeddings support: request embeddings encoded as base64 where providers allow it to improve compatibility and reduce transport issues.
    • Security & connectors: daily CVE Slack alert, Google Calendar connector hardening, and improved OAuth/token sharing.

    Breaking Changes

    • datamodel-code-generator requirement bumped: if you use a custom graph_model generation step, you must have datamodel-code-generator >= 0.56.0. What to do: upgrade that dependency when generating custom graph models to avoid generation errors.

    New Features

    • Store code docstrings in the code graph: Docstrings (the documentation strings attached to functions, classes and modules) are now saved as first-class graph documents and linked to the corresponding code symbols. What it does: when you ingest code, the human-readable docstrings are indexed and connected to the code symbol nodes. Why it matters: search and code-aware agents can return richer, context-aware answers and surface inline documentation alongside code references.
    • New Memify API and endpoints: 'memify' is the process of converting content (files, messages, or other data) into memory entries the system can store and recall. What it does: we added server endpoints and CLI wiring to create memory entries (memify) directly via the API. Why it matters: it simplifies turning raw content into searchable, recallable memories for use in recall and improve flows.
    • Request base64 embeddings where supported: some embedding providers accept embeddings encoded as base64 to avoid binary transport problems. What it does: Cognee will request base64-encoded embedding responses when the provider supports it. Why it matters: improves interoperability with certain providers and reduces problems when sending/receiving binary embedding payloads.
    • Persist a session's trace backlog as one document: traces are the interaction records (events, steps, logs) from a user session. What it does: instead of writing many small trace documents, Cognee can now persist a session's backlog as one consolidated document. Why it matters: fewer database writes and improved throughput for high-traffic sessions, leading to faster ingestion and lower resource usage.
    • Build trace pass windows in a single cognify run: 'cognify' is the pipeline run that converts raw traces into memory entries. What it does: trace windowing for a pass is computed in one cognify execution rather than multiple runs. Why it matters: reduces repeated pipeline runs and speeds up trace processing so results appear faster and more consistently.

    Improvements

    • Session/dataset binding reliability and speed: bound sessions (sessions tied to a specific dataset — a collection of documents you've added) now skip unnecessary re-reads and correctly route skill runs to the bound dataset. This reduces latency and fixes several edge cases where a stale or mismatched binding could cause errors.
    • Curation and distillation fixes: distilled entries are sealed per curator batch and new entries are curated by default on ea
  5. v1.6.5.dev0v1.6.5.dev0 — Distillation, Embeddings & Connector Hardening2026-10-16 · 2026-10-16 02:42 UTC
    查看更新说明

    v1.6.5.dev0 — Distillation, Embeddings & Connector Hardening

    Release Date: 2026-10-16 Changes: v1.6.4.dev0 → v1.6.5.dev0

    Pull Requests: #5287, #5534, #5620, #5622, #5720, #5721, #5722, #5725, #5726, #5751, #5798, #5898


    Summary

    This release focuses on making memory distillation more reliable, improving how embeddings are produced and metered, and hardening connectors and LLM integrations. It includes several bug fixes, security and operational improvements, and a few breaking changes related to legacy embedding surfaces and local cache layout.

    Highlights

    • More reliable distillation: distillation now reads only the QA turns it needs, seals entries per curator batch, and curates every new entry by default so distilled memories are accurate and consistent.
    • Embeddings improvements: support requesting base64-encoded embeddings where supported, meter embedding token usage, lower the default embedding batch size for stability, and keep local model cache under a predictable path.
    • Connector and LLM fixes: Gmail and Google Calendar connectors were hardened (better quota handling and permissions), litellm and Mistral model handling were improved, and Azure token handling is shared to reduce auth complexity.
    • Security & alerts: daily CVE alert delivery to Slack was added and repository security docs updated to help teams stay informed.

    Breaking Changes

    • Triplet embedding / triplet memify surfaces removed or deprecated — the older triplet embedding surfaces have been deprecated and parts removed. If you rely on 'triplet' embedding flows, migrate to the newer embedding surfaces and memify pipelines. Check your pipelines and replacements before upgrading.
    • datamodel-code-generator minimum version raised — custom graph model generation requires datamodel-code-generator >= 0.56.0. Upgrade this dependency if you use custom graph models.
    • Fastembed cache path change — FASTEMBED_CACHE_PATH was removed from the .env.template and fastembed now uses ~/.cognee/models by default. If you relied on a custom FASTEMBED_CACHE_PATH, update your environment or move your cache to the new location.

    New Features

    • Request Base64 embeddings where supported — Some embedding providers can return vectors encoded as base64. Cognee now requests base64 embeddings when the provider supports them. Why it matters: base64 can improve compatibility with certain providers and transports, reducing encoding errors and simplifying integrations.
    • Daily CVE alert to Slack — A new automated alert posts daily security advisories (CVE summaries) to a configured Slack channel. Why it matters: keeps your team aware of new vulnerabilities affecting dependencies so you can act faster.
    • Clone a chosen branch of a repo during ingestion — You can now select which branch to clone when pulling a repository. Why it matters: makes ingestion reproducible and lets you index branch-specific code or docs without manual repo handling.
    • Embedding token usage metering — The system now records the number of embedding tokens used per activity. Why it matters: helps understand and audit embedding usage for cost tracking and debugging.

    Improvements

    • More focused distillation: distillation now reads only the required QA turns (instead of whole conversations), and curator runs seal distilled entries per batch so partial results don’t leak. This reduces work and makes distilled summaries more deterministic.
    • Curate every new entry per distill run by default — every newly added memory entry is considered for distillation unless you change the setting, making sure new content is summarized promptly.
    • Bind typed entries to the session's dataset — when the system writes typed (structured) memory entries during a session, they are now correctly associated with that session's dataset. Why it matters: preserves correct dataset ownership and prevents data from landing in the wrong dataset.
    • Take dataset_id on remember_skill_run_entry — explicit dataset r

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    📄 Read the research paper: Optimizing the Interface Between Knowledge Graphs and LLMs for Complex Reasoning — Markovic et al., 2025

    When to use Cognee

    • Build a Company Brain. Bring documentation, conversations, tickets, code, and agent work into shared memory. Help your team and agents connect a decision to the discussion and implementation behind it. Explore Company Brain.
    • Give agents memory across runs. Retain project context, past decisions, fixes, and learned rules. Distill useful session lessons into durable knowledge that another session can retrieve. Connect your agent.
    • Ground agents in your domain. Structure memory around the entities and relationships your application needs, with custom data models and ontologies. Explore ontologies.

    Choose your starting point

    I want to…Start here
    Build memory without an LLMLocal Python quickstart
    Explore a prebuilt graph without downloading modelsBundled demo
    Generate answers with a local or hosted LLMOptional LLM setup
    Give an existing agent memoryPlugins and MCP
    Run Cognee on my infrastructureDeployment options
    Use a managed serviceCognee Cloud

    Quickstart

    Requires Python 3.10–3.14.

    1. Install Cognee with pip, uv, or your preferred Python package manager. The gliner extra brings the local extraction model used when no LLM key is configured:

    uv pip install "cognee[gliner]"
    

    Run locally without an LLM

    2. Build and query memory. With no LLM key configured, Cognee extracts the graph with the local GLiNER model and embeds with a local embedding model; both download on first use.

    Save this as quickstart.py and run python quickstart.py if you are feeling old school, or tell your LLM to do it:

    import asyncio
    
    import cognee
    
    
    async def main():
        # Extract a knowledge graph and embed the text with local models.
        await cognee.remember(
            "Marie Curie was born in Warsaw and worked at the University of Paris.",
            dataset_name="local_quickstart",
        )
    
        # Retrieve the matching source text; no LLM generates an answer.
        results = await cognee.recall(
            "Where was Marie Curie born?",
            datasets=["local_quickstart"],
        )
        for result in results:
            print(result)
    
    
    if __name__ == "__main__":
        asyncio.run(main())
    

    The same workflow is available from the CLI:

    cognee-cli remember "Marie Curie was born in Warsaw." -d local_quickstart
    cognee-cli recall "Where was Marie Curie born?" -d local_quickstart
    

    Text ingestion, retrieval, and session storage work without an LLM. LLM-dependent improvement stages skip automatically.

    Generated answers and media processing that requires a vision or transcription model need additional LLM configuration.

    The bundled GLiNER extractor is a demo of Cognee's small-model pipeline. For a production-ready version with higher accuracy and broader label coverage, reach out to us.

    Optional: Configure the LLM

    3. Add an LLM to get generated answers instead of retrieved passages:

    import os
    
    os.environ["LLM_API_KEY"] = "YOUR_OPENAI_API_KEY"
    

    Alternatively, create a .env file using our template.

    Once a key is set, Cognee uses OpenAI for language models and embeddings, and processing and generated answers make provider calls. See installation, other providers, or local Ollama models for other setups.

    Explore the bundled demo

    To explore a prebuilt graph without downloading extraction or embedding models:

    cognee-cli demo
    

    This command works with the base pip install cognee package. It loads bundled sample data and runs keyword search without an API key. Use the local quickstart above to build a graph from your own text.

    How Cognee works

    Cognee builds connected memory from different sources. Text becomes entities, relationships, and searchable chunks; code becomes a graph of symbols and dependencies. Session distillation curates accepted lessons into permanent memory.

    At query time, retrieval selects relevant graph, vector, or code context. Your application can inspect the retrieved evidence and use it to answer a question or continue an agent task.

    OperationWhat it doesLearn more
    rememberStore content or code in permanent memory, or in a session when a session ID is supplied.Store memory
    recallRetrieve context and answers, using automatic routing or a chosen search strategy.Query memory
    improveEnrich memory, apply feedback, and bridge session knowledge into the graph.Improve memory
    forgetRemove a specific item or dataset.Delete memory

    Explore the architecture and session lifecycle.

    Connect your agent

    Install the Claude Code plugin:

    claude plugin marketplace add topoteretes/cognee-integrations
    claude plugin install cognee-memory@cognee
    

    Or install the Codex plugin. Enable hooks first, either with the CLI:

    codex features enable hooks
    

    or in ~/.codex/config.toml:

    [features]
    hooks = true
    

    Then add the marketplace and the plugin:

    codex plugin marketplace add topoteretes/cognee-integrations --ref main
    codex plugin add cognee@cognee
    

    Follow the setup guide for Claude Code or Codex to configure local or remote memory.

    InterfaceStart here
    Claude Code memory pluginInstall and configure the plugin
    Codex memory pluginInstall and configure the plugin
    OpenClaw memory pluginInstall @cognee/cognee-openclaw
    Cursor, Cline, and other MCP clientsCognee MCP guide and server README
    Python applicationsPython API reference
    TypeScript applicationsTypeScript SDK
    Rust applicationsCognee-RS
    Applications using HTTPREST API reference

    Browse the integrations repository for agent frameworks, plugins, and source connectors. Each guide describes its setup and memory capture behavior.

    To inspect a local installation in the UI:

    cognee-cli -ui
    

    The UI launcher requires Node.js/npm; Docker is needed for its MCP service. See local UI setup.

    Explore examples

    Deploy Cognee

    For a local API demo using a prebuilt image, follow the minimal Docker Compose guide. It includes a persistent-volume configuration and explains the single-user demo settings. Or run the image directly:

    docker run --rm -it -p 8000:8000 \
      -e LLM_API_KEY="sk-..." \
      -e ENABLE_BACKEND_ACCESS_CONTROL=false \
      -v cognee_storage:/cognee-storage \
      cognee/cognee:main
    

    ENABLE_BACKEND_ACCESS_CONTROL=false is the single-user/local posture — without it the API defaults to multi-tenant mode and every /api/v1 call requires an authenticated user. To keep authentication on instead, set DEFAULT_USER_PASSWORD to make the default account loginable (see the compose guide). Note that --rm discards container-local data on exit; the -v cognee_storage:/cognee-storage named volume keeps your memory across runs.

    To run the API, UI, and MCP server from a source checkout, clone this repository, enter its directory, copy .env.template to .env, and configure your providers. Then run:

    docker compose --profile ui --profile mcp up
    

    The default ports are API 8000, UI 3000, and MCP 8001. For deployment beyond a local demo, configure authentication, persistent storage, and compatible backends using the permissions guide and deployment templates. Cognee Cloud provides the managed option.

    The cognee/cognee image ships with the GLiNER runtime baked in, so text ingestion and retrieval work in Docker without an LLM key; the local extraction and embedding models download on first use. Set LLM_API_KEY (as above) when you want generated answers.

    Run the Whole Memory Layer on Postgres

    Graph memory traditionally means operating a stack — a graph database for relationships, a vector database for embeddings, Redis for sessions, and a relational database for metadata — all deployed, secured, and paid for before an agent remembers anything. Since cognee 1.0 you can run the entire memory layer on a single Postgres instance.

    ⚠️ Warning: Using Postgres as a graph store is currently released as a demo feature. The production-ready version is available as a licensed product. Use the demo to keep relational metadata, PGVector, and graph state working together in one Postgres service.

    Benchmarks and research

    The BEAM evaluation measures conversational memory using synthetic long-context conversations and an LLM judge. The reported runs use Cognee's memory components with benchmark-specific data formatting, prompts, and retrieval configuration.

    BEAM contextReported score (0–1)Scope
    100K tokens0.79Fixed hybrid retrieval; four evaluation rounds over 20 questions from one held-out conversation.
    10M tokens0.67Exploratory result; question-type routing selected and scored on the same question set, averaged over five rounds.

    The two settings use different conversations, ingestion models, and retrieval-selection procedures. Read the methodology, models, limitations, and reproduction instructions before comparing these scores with other systems. The report also documents the remaining reproduction gap for the distributed 10M ingestion.

    For the research behind Cognee's graph/LLM interface, see Optimizing the Interface Between Knowledge Graphs and LLMs for Complex Reasoning (Markovic et al., 2025).

    Latest News

    Watch Demo

    • v1.6.1 — Google Sync & Visualization (September 24, 2026): Google Drive and Gmail OAuth connectors bundled in the SDK, /visualize/json streamed in chunks for large graphs, and the GLiNER installer moved off the event loop with CPU torch installed on first use.
    • Document external_metadata is stamped on every chunk and surfaced in hybrid retrieval. Breaking: dlt is now a core dependency — make sure it is installed if you manage dependencies by hand.
    • v1.6.0 — Keyless workflows & pipeline reliability (September 18, 2026): build and search text memory with local models and no cloud LLM key; LLM-dependent improvement stages skip when no LLM is configured, and pipeline recovery preserves completed documents after crashes.

    Community & Support

    Contributing

    We welcome contributions from the community! Your input helps make Cognee better for everyone. See CONTRIBUTING.md to get started.

    Code of Conduct

    We're committed to fostering an inclusive and respectful community. Read our Code of Conduct for guidelines.

    Research & Citation

    We recently published a research paper on optimizing knowledge graphs for LLM reasoning:

    @misc{markovic2025optimizinginterfaceknowledgegraphs,
          title={Optimizing the Interface Between Knowledge Graphs and LLMs for Complex Reasoning},
          author={Vasilije Markovic and Lazar Obradovic and Laszlo Hajdu and Jovan Pavlovic},
          year={2025},
          eprint={2505.24478},
          archivePrefix={arXiv},
          primaryClass={cs.AI},
          url={https://arxiv.org/abs/2505.24478},
    }