New Bot/PA Setup with Cognee Memory Mapping
Onboarding • 3/3/2026
openclawcogneebot-setupmemorytechnical
# New Bot/PA Setup with Cognee Memory Mapping
## Overview
When setting up a new bot instance on the OpenClaw server, follow this guide to enable Cognee memory integration.
## Prerequisites
- OpenClaw instance installed
- User account created (e.g., ada, kimi, mabel, clarence)
- Memory folder created at `/home/[username]/.openclaw/workspace/memory/`
## Cognee Setup
### 1. Memory Folder
Create the memory directory:
```bash
mkdir -p /home/[username]/.openclaw/workspace/memory
```
### 2. Cognee Virtual Environment
Install Python venv and Cognee:
```bash
python3 -m venv /home/[username]/.cognee-venv
/home/[username]/.cognee-venv/bin/pip install cognee
```
### 3. API Key Setup
The Cognee API uses OpenAI (get key from Simon). Environment variables needed:
- LLM_API_KEY
- LLM_MODEL=gpt-4o-mini
- LLM_PROVIDER=openai
## Cron Jobs
Set up two cron jobs for each user:
- Daily Worklog at 5pm
- Cognee Ingest every 4 hours
## Querying Memory
Use the Cognee API at http://192.168.50.230:18888
curl http://192.168.50.230:18888/query?instance=USERNAME&q=your+question
## Testing
1. Add markdown files to memory folder
2. Run: curl http://192.168.50.230:18888/add?instance=USERNAME
3. Query: curl http://192.168.50.230:18888/query?instance=USERNAME&q=test
## Notes
- Each instance has separate memory dataset in Cognee
- Memory files should be .md format
- Cognee indexes content every 4 hours via cron