clawdbot-workspace/MEMORY-SYSTEM-QUICKSTART.md

136 lines
2.1 KiB
Markdown

# Memory System Quick Start (5 Minutes)
For the full deep dive, see `THE-MEMORY-SYSTEM-GUIDE.md`. This is the 80/20 version.
---
## Step 1: Create Directory
```bash
cd ~/.clawdbot/workspace
mkdir -p memory
```
---
## Step 2: Create Daily Log Template
```bash
cat > memory/TEMPLATE-daily.md << 'EOF'
# Daily Log — YYYY-MM-DD
## What We Worked On
-
## Decisions Made
-
## Next Steps
-
## Open Questions / Blockers
-
## Notable Context
(anything future-me needs to know that isn't captured above)
EOF
```
---
## Step 3: Configure Embeddings
Add to `~/.clawdbot/clawdbot.json`:
```json
{
"agents": {
"defaults": {
"memorySearch": {
"enabled": true,
"provider": "openai",
"model": "text-embedding-3-small"
}
}
},
"models": {
"providers": {
"openai": {
"apiKey": "YOUR_OPENAI_API_KEY"
}
}
}
}
```
**Restart Clawdbot:** `clawdbot gateway restart`
---
## Step 4: Create Your First Log
```bash
cp memory/TEMPLATE-daily.md memory/$(date +%Y-%m-%d).md
```
Edit it with some notes. Anything. Just to test.
---
## Step 5: Index & Test
```bash
# Build the index
clawdbot memory index --verbose
# Check status
clawdbot memory status --deep
# Test search
clawdbot memory search "test"
```
**Expected output:**
```
✓ Memory search enabled
✓ Provider: openai
✓ Files indexed: 1
✓ Chunks: 2-5 (depending on your notes)
```
---
## Step 6: Use It
### In Chat (Agent)
```typescript
// Morning: read yesterday + today
read("memory/2026-02-08.md")
read("memory/2026-02-09.md")
// During work: search context
memory_search("what did we decide about X")
// End of day: write notes
write("memory/2026-02-09.md", "## Decisions Made\n- Chose Y because Z")
```
### Daily Habit (Human)
```bash
# Backup at end of day
cd ~/.clawdbot/workspace
git add -A && git commit -m "Daily backup: $(date +%Y-%m-%d)" && git push
```
---
## That's It
- **Markdown files** = source of truth (edit anytime)
- **SQLite index** = search engine (automatic)
- **Git backup** = safety net (daily)
Read `THE-MEMORY-SYSTEM-GUIDE.md` when you want the full power.
ᕕ( ᐛ )ᕗ