codebase
無料Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Antigravity.
日本語の概要は準備中です。原文の説明を表示しています。
AI knowledge engine - a memory system in 6 lines of code. remember/recall/forget/improve loop, vector + graph search, OpenClaw plugin supported.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
AI knowledge engine — a memory system in 6 lines of code.
Provenance: contributed by ClawHub user @smseow001 (originally published as
cognee-memoryv1.0.0, MIT-0). Translated from Chinese and adapted for this repository; the verbatim original is preserved in this file's git history.
Website: https://cognee.ai
GitHub: https://github.com/topoteretes/cognee
Install: pip install cognee
OpenClaw plugin: @cognee/cognee-openclaw
| Operation | Purpose | Notes |
|---|---|---|
remember | Store a memory | Persisted into the knowledge graph |
recall | Query memories | Automatically routes to the best search strategy |
forget | Delete memories | Remove outdated or incorrect memories |
improve | Optimize learning | Continuous learning improves accuracy |
import cognee
import asyncio
async def main():
# Store into the knowledge graph
await cognee.remember("Cognee turns documents into AI memory.")
# Store into the session cache (fast)
await cognee.remember("User prefers detailed explanations.", session_id="chat_1")
# Query (auto-routed)
results = await cognee.recall("What does Cognee do?")
for result in results:
print(result)
# Delete
await cognee.forget(dataset="main_dataset")
asyncio.run(main())
cognee-cli remember "Cognee turns documents into AI memory."
cognee-cli recall "What does Cognee do?"
cognee-cli forget --all
cognee-cli -ui # open the local UI
# LLM API key (required)
export LLM_API_KEY="your-openai-key"
# Or use another LLM provider
# See: https://docs.cognee.ai/setup-configuration/llm-providers
# Cognee Cloud (optional)
export COGNEE_SERVICE_URL="https://your-instance.cognee.ai"
export COGNEE_API_KEY="ck_..."
User: "My invoice issue still isn't resolved"
Cognee tracks: interaction history, failed operations, resolved cases, product history
Agent reply: "Found 2 similar billing cases resolved last month; the issue was
caused by a payment-system sync delay"
User: "How do I compute customer retention?"
Cognee tracks: expert SQL queries, workflow patterns, schema structure, successful implementations
Agent reply: "A senior analyst solved a similar retention query — here is their approach..."
# Session 1
await cognee.remember("User prefers detailed explanations", session_id="user_123")
# Session 2 (query across sessions)
results = await cognee.recall("What does the user prefer?", session_id="user_123")
# Install through OpenClaw's plugin manager (not plain npm):
openclaw plugins install @cognee/cognee-openclaw
# Then configure Cognee as the memory provider:
openclaw cognee setup
The plugin integrates automatically via OpenClaw's hook system:
before_prompt_build → inject relevant memories into the prompt (auto-recall)after_tool_call → capture tool activity as trace entriesllm_output → capture prompt/answer pairs into the session cacheagent_end → sync changed memory files after each runsession_end → bridge the session cache into the permanent knowledge graphSee the plugin README for required hook permissions
(allowPromptInjection, allowConversationAccess) and configuration options.
| Capability | File-based memory | Cognee |
|---|---|---|
| Storage | Files | Vector + graph dual store |
| Search | Keywords | Semantic + relational |
| Learning | None | forget + improve |
| Cross-agent | Unsupported | Shared knowledge graph |
| Visualization | None | CLI UI |
| Platform | Notes |
|---|---|
| Cognee Cloud | Managed service |
| Modal | Serverless, GPU autoscaling |
| Railway | Simplified PaaS |
| Fly.io | Edge deployment |
| Render | Simple PaaS |
import cognee
import asyncio
async def memory_loop():
# 1. Learn new knowledge
await cognee.remember("The user is learning Python programming")
await cognee.remember("The user prefers learning by doing")
# 2. Query related memories
results = await cognee.recall("What are the user's learning preferences?")
# 3. Improve based on feedback
await cognee.improve("Correct the misunderstanding of the user's preferences")
# 4. Forget incorrect memories
await cognee.forget("The incorrect assumption")
asyncio.run(memory_loop())
cognee@cognee/cognee-openclaw separatelyPowered by Cognee | https://cognee.ai
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Antigravity.
日本語の概要は準備中です。原文の説明を表示しています。
Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Codex.
日本語の概要は準備中です。原文の説明を表示しています。
Index a code repository into Cognee's code graph and query it deterministically (callers, impact analysis, paths, endpoints). Use for structural code questions, "index this repo", and checking what a re-index changed.
日本語の概要は準備中です。原文の説明を表示しています。
A multi-day digest of the user's own coding-agent sessions — sessions per day and project, most-edited files, and every lesson Cognee distilled into the knowledge graph in that window. Use only when the user explicitly asks for a weekly digest, a retro, a recap or report of their recent sessions, or asks for the `cognee-digest` skill by name. Not for questions about code or the current task.
日本語の概要は準備中です。原文の説明を表示しています。
A multi-day digest of the user's own coding-agent sessions — sessions per day and project, most-edited files, and every lesson Cognee distilled into the knowledge graph in that window. Use only when the user explicitly asks for a weekly digest, a retro, a recap or report of their recent sessions, or invokes /cognee-digest. Not for questions about code or the current task.
日本語の概要は準備中です。原文の説明を表示しています。
Use when an agent must stand up the OpenClaw↔Cognee integration with FalkorDB as the vector + graph store. This skill is SELF-CONTAINED — it tells you to generate every file (Dockerfile, sitecustomize.py, docker-compose.yaml) from the exact contents below, build a custom Cognee image that loads the FalkorDB adapter, run Cognee + FalkorDB together, self-verify the adapter registered, and point the OpenClaw cognee plugin at it (including per-agent graphs). No other files in this directory are required.
日本語の概要は準備中です。原文の説明を表示しています。