Why Use This Integration
- Auto-Index: Memory files sync to Cognee on startup and after each agent run
- Auto-Recall: Relevant memories are injected as context before every prompt
- Graph Search: Natural language queries powered by knowledge graph traversal
- Zero Friction: Works with OpenClaw’s native Markdown memory files
Installation
Quick Start
1. Start Cognee
Use the Local Docker setup to run Cognee quickly. You can also use this minimal Docker Compose file.2. Get Your API Key
Register a user and login to get your bearer token:COGNEE_API_KEY.
You can also explore the API at http://localhost:8000/docs (Swagger UI) to register and login interactively.
3. Enable the Plugin
Add to~/.openclaw/config.yaml:
How It Works
Memory persists across OpenClaw sessions automatically. The plugin syncs yourMEMORY.md and memory/*.md files to Cognee, building a knowledge graph that can traverse relationships between concepts.
- On Startup: Scans memory directory and syncs files to Cognee (add new, update changed, skip unchanged)
- Before Agent Run: Searches Cognee for memories relevant to your prompt and injects them as context
- After Agent Run: Re-scans memory files and syncs any changes the agent made
- State Tracking: Maintains sync index at
~/.openclaw/memory/cognee/for efficient updates
The plugin uses hash-based change detection to minimize API calls. Only new or modified files are synced to Cognee.
Search Types
Here are the available search types:GRAPH_COMPLETIONCHUNKSSUMMARIES