OpenSource-Hub

cognee

フレームワーク

topoteretes/cognee

AI エージェントに永続的なメモリを提供するオープンソースのナレッジグラフプラットフォーム。

概要

Cognee は、セルフホスト型のナレッジグラフエンジンにより、AI エージェントに永続的な長期メモリを提供します。あらゆる形式でデータを取り込み、ナレッジグラフを構築することで、エージェントが異なるセッション間で思い出し、つなぎ合わせ、完全なコンテキストに基づいて行動できるようにします。

README プレビュー

\n  \n    \n  \n\n  \n\n  Cognee - The Open-Source AI Memory Platform for Agents\n\n  \n  Demo\n  .\n  Docs\n  .\n  Learn More\n  ·\n  Join Discord\n  ·\n  Join r/AIMemory\n  .\n  Community Plugins & Add-ons\n  \n\n\n  [](https://GitHub.com/topoteretes/cognee/network/)\n  [](https://GitHub.com/topoteretes/cognee/stargazers/)\n  [](https://GitHub.com/topoteretes/cognee/commit/)\n  [](https://github.com/topoteretes/cognee/tags/)\n  [](https://pepy.tech/project/cognee)\n  [](https://github.com/topoteretes/cognee/blob/main/LICENSE)\n  [](https://github.com/topoteretes/cognee/graphs/contributors)\n  \n\n\n  \n    \n  \n\n\nCognee 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\n\n  \n  🌐 This README is also available in:\n  :\n  \n  Deutsch |\n  Español |\n  Français |\n  日本語 |\n  한국어 |\n  Português |\n  Русский |\n  中文\n  \n\n\n\n  \n\n\n\n📄 Read the research paper: [Optimizing the Interface Between Knowledge Graphs and LLMs for Complex Reasoning](https://arxiv.org/abs/2505.24478) — Markovic et al., 2025\n\n\n## About Cognee\n\nCognee is an open-source AI memory platform for AI Agents. Ingest data in any format, and Cognee continuously builds a self-hosted knowledge graph that gives your agents persistent long-term memory across sessions. Cognee combines vector embeddings, graph reasoning, and cognitive-science-grounded ontology generation to make documents both searchable by meaning and connected by relationships that evolve as your knowledge does.\n\n:star: _Help us reach more developers and grow the cognee community. Star this repo!_\n\n:books: _Check our detailed [documentation](https://docs.cognee.ai/getting-started/installation#environment-configuration) for setup and configuration._\n\n:crab: _Available as a plugin for your OpenClaw — [cognee-openclaw](https://www.npmjs.com/package

FAQ (3)

トラブル対応
cogneeのKnowledgeGraphがグラフ抽出時にノードとエッジのプロパティを保存しないのはなぜですか?

これは cognee 1.6.4 における既知のバグです。デフォルトの抽出プロンプト(cognee/infrastructure/llm/prompts/generate_graph_prompt.txt)は LLM にキーバリュー形式のプロパティ(例:'profession'、カウント数、測定値)を出力するよう指示しますが、cognee/shared/data_models.py にあるランタイムの KnowledgeGraph スキーマでは、Node が id/name/type/description のみ、Edge が source_node_id/target_node_id/relationship_name/description のみで定義されており、properties フィールドが存在しません。そのため、これらの値は description に折り畳まれるか、暗黙のうちに破棄されます。修正方法:cognee チームはこの問題を解決済みです。pip install -U cognee を実行して 1.6.4 以降のリリースにアップグレードしてください。1.6.4 での回避策:抽出された属性の保存先を確保できるよう、Node および Edge の pydantic モデルに properties: dict フィールドを含んだカスタムの graph_model を cognee.cognify()/cognee.remember() に渡してください。

参照 Issue #5886
トラブル対応
cognee で矛盾検出中に発生する ladybug 'UNREACHABLE_CODE' アサーションエラー (csr_node_group.cpp:434) を修正するには?

これは、デフォルトの ladybug グラフプロバイダーを使用する cognee 1.6.1 における既知のバグです。CONTRADICTION_DETECTION=true の場合、detect_contradictions タスクは ladybug/adapter.py の add_edges 内で Assertion failed ... csr_node_group.cpp:434: UNREACHABLE_CODE というエラーで失敗します。パイプラインは完了と報告されますが、矛盾エッジは通知なく破棄されます。回避策: アサーションは ladybug のストレージレイヤー内で発生し、グラフの整合性を損なうリスクがあるため、修正がリリースされるまでは、環境で CONTRADICTION_DETECTION=false を設定してこの機能を無効にしてください。注: 検出される「矛盾」の多くは誤検出のエンティティタイプ競合(例: 信頼度 1.00 での「X is a person」と「X is a feature」の対立)であるため、この機能を無効にしても実質的な価値の損失はほとんどない可能性があります。

参照 Issue #5221
トラブル対応
cognee の README にある、スペースを含む 'YOUR OPENAI_API_KEY' プレースホルダーを修正するにはどうすればよいですか?

これはドキュメントの誤字であり、PR #6031 で修正され、dev にマージされました。「Add an LLM to get generated answers」の Python スニペットでは、正しいプレースホルダーにスペースはありません: os.environ["LLM_API_KEY"] = "YOUR_OPENAI_API_KEY"。プレースホルダー全体を実際の OpenAI API キーに置き換えてください (例: os.environ["LLM_API_KEY"] = "sk-...")。同じ誤字は韓国語版および中国語版の README でも修正されました。

参照 Issue #5908