Cognee 是 AI Skill Hub 本期精选Agent工作流之一。在 GitHub 上收获超过 18.4k 颗 Star,综合评分 8.5 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
Cognee 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
Cognee 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install cognee
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install cognee
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/topoteretes/cognee
cd cognee
pip install -e .
# 验证安装
python -c "import cognee; print('安装成功')"
# 命令行使用
cognee --help
# 基本用法
cognee input_file -o output_file
# Python 代码中调用
import cognee
# 示例
result = cognee.process("input")
print(result)
# cognee 配置文件示例(config.yml) app: name: "cognee" debug: false log_level: "INFO" # 运行时指定配置文件 cognee --config config.yml # 或通过环境变量配置 export COGNEE_API_KEY="your-key" export COGNEE_OUTPUT_DIR="./output"
<br />
<p>Cognee - The Open-Source AI Memory Platform for Agents</p>
<p align="center"> <a href="https://www.youtube.com/watch?v=8hmqS2Y5RVQ&t=13s">Demo</a> . <a href="https://docs.cognee.ai/">Docs</a> . <a href="https://cognee.ai">Learn More</a> · <a href="https://discord.gg/NQPKmU5CCg">Join Discord</a> · <a href="https://www.reddit.com/r/AIMemory/">Join r/AIMemory</a> . <a href="https://github.com/topoteretes/cognee-community">Community Plugins & Add-ons</a> </p>
<p> <a href="https://GitHub.com/topoteretes/cognee/network/"><img src="https://img.shields.io/github/forks/topoteretes/cognee.svg?style=social&label=Fork&maxAge=2592000" alt="GitHub forks"></a> <a href="https://github.com/topoteretes/cognee"><img src="https://img.shields.io/github/stars/topoteretes/cognee.svg?style=social&label=Star&maxAge=2592000" alt="GitHub stars"></a> <a href="https://GitHub.com/topoteretes/cognee/commit/"><img src="https://badgen.net/github/commits/topoteretes/cognee" alt="GitHub commits"></a> <a href="https://github.com/topoteretes/cognee/tags/"><img src="https://badgen.net/github/tag/topoteretes/cognee" alt="GitHub tag"></a> <a href="https://pepy.tech/project/cognee"><img src="https://static.pepy.tech/badge/cognee" alt="Downloads"></a> <a href="https://github.com/topoteretes/cognee/blob/main/LICENSE"><img src="https://img.shields.io/github/license/topoteretes/cognee?colorA=00C586&colorB=000000" alt="License"></a> <a href="https://github.com/topoteretes/cognee/graphs/contributors"><img src="https://img.shields.io/github/contributors/topoteretes/cognee?colorA=00C586&colorB=000000" alt="Contributors"></a> <a href="https://github.com/sponsors/topoteretes"><img src="https://img.shields.io/badge/Sponsor-❤️-ff69b4.svg" alt="Sponsor"></a> </p>
<p> <a href="https://trendshift.io/repositories/13955" target="_blank" style="display:inline-block;"> <img src="https://trendshift.io/api/badge/repositories/13955" alt="topoteretes%2Fcognee | Trendshift" width="250" height="55" /> </a> </p>
<p>Cognee is the open-source AI memory platform that gives AI agents persistent long-term memory across sessions. Ingest data in any format, build a self-hosted knowledge graph, and let every agent recall, connect, and act with full context</p>
<p align="center"> 🌐 This README is also available in:<br /> <a href="https://www.readme-i18n.com/topoteretes/cognee?lang=de">Deutsch</a> | <a href="https://www.readme-i18n.com/topoteretes/cognee?lang=es">Español</a> | <a href="https://www.readme-i18n.com/topoteretes/cognee?lang=fr">Français</a> | <a href="https://www.readme-i18n.com/topoteretes/cognee?lang=ja">日本語</a> | <a href="README_ko.md">한국어</a> | <a href="https://www.readme-i18n.com/topoteretes/cognee?lang=pt">Português</a> | <a href="https://www.readme-i18n.com/topoteretes/cognee?lang=ru">Русский</a> | <a href="https://www.readme-i18n.com/topoteretes/cognee?lang=zh">中文</a> </p>
<p align="center"> <img src="assets/cognee-demo.gif" alt="Cognee Demo" width="80%" /> </p> </div>
📄 Read the research paper: Optimizing the Interface Between Knowledge Graphs and LLMs for Complex Reasoning — Markovic et al., 2025
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.
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.
Requires Python 3.10–3.14.
You can install Cognee with pip, uv, or your preferred Python package manager.
uv pip install cognee
<a id="run-with-docker"></a>
import os
os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY" Alternatively, create a .env file using our template.
The default uses OpenAI for language models and embeddings. Processing and generated answers make provider calls. See installation, other providers, or local Ollama models for other setups.
import cognee
import asyncio
async def main():
# Store permanently in the knowledge graph (runs add + cognify + improve)
await cognee.remember("Cognee turns documents into AI memory.")
# Store in session memory (fast cache, syncs to graph in background)
await cognee.remember("User prefers detailed explanations.", session_id="chat_1")
# Query with auto-routing (picks best search strategy automatically)
results = await cognee.recall("What does Cognee do?")
for result in results:
print(result)
# Query session memory first, fall through to graph if needed
results = await cognee.recall("What does the user prefer?", session_id="chat_1")
for result in results:
print(result)
# Delete when done
await cognee.forget(dataset="main_dataset")
if __name__ == '__main__':
asyncio.run(main())
[features] hooks = true
bash codex plugin marketplace add topoteretes/cognee-integrations --ref main codex plugin add cognee@cognee
Follow the [plugin setup guide](https://github.com/topoteretes/cognee-integrations/tree/main/integrations/claude-code) to configure local or remote memory.
| Interface | Start here |
| --- | --- |
| Claude Code memory plugin | [Install and configure the plugin](https://github.com/topoteretes/cognee-integrations/tree/main/integrations/claude-code) |
| OpenClaw memory plugin | [Install `@cognee/cognee-openclaw`](https://www.npmjs.com/package/@cognee/cognee-openclaw) |
| Cursor, Cline, and other MCP clients | [Cognee MCP guide](https://docs.cognee.ai/cognee-mcp/mcp-overview) and [server README](cognee-mcp/README.md) |
| Python applications | [Python API reference](https://docs.cognee.ai/python-api) |
| TypeScript applications | [TypeScript SDK](https://docs.cognee.ai/typescript/getting-started) |
| Rust applications | [Cognee-RS](https://github.com/topoteretes/cognee-rs) |
| Applications using HTTP | [REST API reference](https://docs.cognee.ai/api-reference/introduction) |
Browse the [integrations repository](https://github.com/topoteretes/cognee-integrations) for agent frameworks, plugins, and source connectors. Each guide describes its setup and memory capture behavior.
To inspect a local installation in the UI:
bash cognee-cli -ui ```
The UI launcher requires Node.js/npm; Docker is needed for its MCP service. See local UI setup.
cognee-cli demo
Cognee 是一个专为 AI Agents 设计的开源 AI Memory 平台。它能够摄取任何格式的数据,并持续构建一个自托管的 Knowledge Graph(知识图谱),为您的 Agent 提供跨会话的持久化长期记忆。通过结合 Vector Embeddings(向量嵌入)、Graph Reasoning(图推理)以及基于认知科学的 Ontology Generation(本体生成)技术,Cognee 不仅能让文档实现语义搜索,还能通过建立深层的关系连接,让 AI 具备更强的理解与推理能力。
Cognee 提供了一套完整的 AI 记忆管理解决方案,旨在解决 Agent 在处理复杂信息时的上下文丢失问题。其核心功能涵盖了从非结构化数据到结构化知识图谱的自动化转换,支持语义检索与关系推理的结合,并能够通过认知科学的方法论优化知识存储结构,为构建具备高度智能和长期记忆能力的 AI Agent 提供坚实的基础设施支撑。
在使用 Cognee 之前,请确保您的开发环境已安装 Python 3.10 至 3.14 版本。建议在虚拟环境中运行,以避免依赖冲突。
您可以通过多种方式安装 Cognee:使用 pip、poetry、uv 或您偏好的 Python 包管理器进行本地安装(例如使用 `uv pip install cognee`)。对于生产环境,您可以选择使用 Cognee Cloud 获取全托管的云端体验,或者通过 Modal 等 Serverless 平台进行一键式部署,实现自动扩缩容及 GPU 工作负载管理。
您可以快速通过几行代码开始体验 Cognee 的核心功能。我们提供了完整的 Colab 端到端演示教程,帮助您快速上手。此外,在项目的 `examples/` 文件夹中,您可以找到丰富的示例代码,包括各种 Demo、操作指南、自定义 Pipeline 以及不同的数据库配置方案。无论是构建客服 Agent 还是复杂的知识管理系统,都能在示例中找到灵感。
在使用前,您需要配置 LLM 的 API Key。可以通过设置环境变量 `export LLM_API_KEY="your-openai-key"` 或创建 `.env` 文件来实现。Cognee 支持多种 LLM Provider,您可以参考官方文档进行集成。对于更高级的集成需求,建议使用项目提供的 `.env.template` 模板进行标准化配置。
Cognee 的核心工作流通过其 API 提供四种关键操作:`remember` 用于将信息永久存储到 Knowledge Graph 中(自动执行 add、cognify 和 improve 流程);`recall` 用于检索相关记忆;`forget` 用于删除不再需要的记忆;以及 `improve` 用于持续优化现有的知识结构。通过这一套完整的生命周期管理,您可以轻松构建具备自我进化能力的 AI 记忆系统。
高质量的开源AI工作流平台,具有广泛的应用前景
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,Cognee 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | cognee |
| 原始描述 | 开源AI工作流:Cognee is the open-source AI memory platform for agents. Give your AI agents per。⭐18.4k · Python |
| Topics | aiagent-memorypython |
| GitHub | https://github.com/topoteretes/cognee |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-06-21 · 更新时间:2026-06-22 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端