2.0 KiB
2.0 KiB
| summary | read_when | ||
|---|---|---|---|
| Cognee memory quick setup and usage |
|
Cognee Memory Provider
Moltbot supports Cognee - open source AI memory - as an optional memory provider. Cognee builds knowledge graph memory backed by embeddings from any data and can be run locally with Docker. Learn more from Cognee Documentation.
Quickstart with Docker
Run the example compose file:
docker compose -f examples/cognee-docker-compose.yaml up -d
Verify:
curl http://localhost:8000/health
Configuration
Put the token in ~/.clawdbot/.env:
COGNEE_API_KEY="your-cognee-access-token"
CLAWDBOT_GATEWAY_TOKEN="your-random-gateway-token"
Configure ~/.clawdbot/moltbot.json (JSON5):
{
agents: {
defaults: {
memorySearch: {
enabled: true,
provider: "cognee",
sources: ["memory", "sessions"],
experimental: { sessionMemory: true },
cognee: {
baseUrl: "http://localhost:8000",
apiKey: "${COGNEE_API_KEY}",
datasetName: "clawdbot",
searchType: "GRAPH_COMPLETION",
maxResults: 6,
autoCognify: true,
timeoutSeconds: 180
}
}
}
}
}
Start the gateway with env loaded:
set -a; source "$HOME/.clawdbot/.env"; set +a
pnpm moltbot gateway --port 18789 --token "$CLAWDBOT_GATEWAY_TOKEN" --verbose
Usage
Cognee indexes MEMORY.md in workspace root, memory/*.md, and session transcripts when sources: ["sessions"] is enabled.
- Initial index and status:
pnpm moltbot memory status --index --json
- Memory updates:
pnpm moltbot memory status --index --update-cognee --json
Troubleshooting
- Connection test:
curl http://localhost:8000/health - Reset cached values that Moltbot reuses:
mv "$HOME/.clawdbot/memory/cognee/main.json" "$HOME/.clawdbot/memory/cognee/main.json.bak"