home / skills / openclaw / skills / memory-setup

This skill configures persistent memory for Moltbot/Clawdbot, enabling memory search, structured logs, and long-term context across sessions.

npx playbooks add skill openclaw/skills --skill memory-setup

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
4.0 KB
---
name: memory-setup
description: Enable and configure Moltbot/Clawdbot memory search for persistent context. Use when setting up memory, fixing "goldfish brain," or helping users configure memorySearch in their config. Covers MEMORY.md, daily logs, and vector search setup.
---

# Memory Setup Skill

Transform your agent from goldfish to elephant. This skill helps configure persistent memory for Moltbot/Clawdbot.

## Quick Setup

### 1. Enable Memory Search in Config

Add to `~/.clawdbot/clawdbot.json` (or `moltbot.json`):

```json
{
  "memorySearch": {
    "enabled": true,
    "provider": "voyage",
    "sources": ["memory", "sessions"],
    "indexMode": "hot",
    "minScore": 0.3,
    "maxResults": 20
  }
}
```

### 2. Create Memory Structure

In your workspace, create:

```
workspace/
├── MEMORY.md              # Long-term curated memory
└── memory/
    ├── logs/              # Daily logs (YYYY-MM-DD.md)
    ├── projects/          # Project-specific context
    ├── groups/            # Group chat context
    └── system/            # Preferences, setup notes
```

### 3. Initialize MEMORY.md

Create `MEMORY.md` in workspace root:

```markdown
# MEMORY.md — Long-Term Memory

## About [User Name]
- Key facts, preferences, context

## Active Projects
- Project summaries and status

## Decisions & Lessons
- Important choices made
- Lessons learned

## Preferences
- Communication style
- Tools and workflows
```

## Config Options Explained

| Setting | Purpose | Recommended |
|---------|---------|-------------|
| `enabled` | Turn on memory search | `true` |
| `provider` | Embedding provider | `"voyage"` |
| `sources` | What to index | `["memory", "sessions"]` |
| `indexMode` | When to index | `"hot"` (real-time) |
| `minScore` | Relevance threshold | `0.3` (lower = more results) |
| `maxResults` | Max snippets returned | `20` |

### Provider Options
- `voyage` — Voyage AI embeddings (recommended)
- `openai` — OpenAI embeddings
- `local` — Local embeddings (no API needed)

### Source Options
- `memory` — MEMORY.md + memory/*.md files
- `sessions` — Past conversation transcripts
- `both` — Full context (recommended)

## Daily Log Format

Create `memory/logs/YYYY-MM-DD.md` daily:

```markdown
# YYYY-MM-DD — Daily Log

## [Time] — [Event/Task]
- What happened
- Decisions made
- Follow-ups needed

## [Time] — [Another Event]
- Details
```

## Agent Instructions (AGENTS.md)

Add to your AGENTS.md for agent behavior:

```markdown
## Memory Recall
Before answering questions about prior work, decisions, dates, people, preferences, or todos:
1. Run memory_search with relevant query
2. Use memory_get to pull specific lines if needed
3. If low confidence after search, say you checked
```

## Troubleshooting

### Memory search not working?
1. Check `memorySearch.enabled: true` in config
2. Verify MEMORY.md exists in workspace root
3. Restart gateway: `clawdbot gateway restart`

### Results not relevant?
- Lower `minScore` to `0.2` for more results
- Increase `maxResults` to `30`
- Check that memory files have meaningful content

### Provider errors?
- Voyage: Set `VOYAGE_API_KEY` in environment
- OpenAI: Set `OPENAI_API_KEY` in environment
- Use `local` provider if no API keys available

## Verification

Test memory is working:

```
User: "What do you remember about [past topic]?"
Agent: [Should search memory and return relevant context]
```

If agent has no memory, config isn't applied. Restart gateway.

## Full Config Example

```json
{
  "memorySearch": {
    "enabled": true,
    "provider": "voyage",
    "sources": ["memory", "sessions"],
    "indexMode": "hot",
    "minScore": 0.3,
    "maxResults": 20
  },
  "workspace": "/path/to/your/workspace"
}
```

## Why This Matters

Without memory:
- Agent forgets everything between sessions
- Repeats questions, loses context
- No continuity on projects

With memory:
- Recalls past conversations
- Knows your preferences
- Tracks project history
- Builds relationship over time

Goldfish → Elephant. 🐘

Overview

This skill enables and configures persistent memory search for Moltbot/Clawdbot, turning short-lived context into durable, searchable knowledge. It guides enabling memorySearch in the agent config, creating a workspace memory structure (MEMORY.md and memory/), and setting up vector search providers. Use it to stop the agent from forgetting past sessions and to surface relevant history during conversations.

How this skill works

The skill inspects and updates the memorySearch block in the agent config to enable embedding-based retrieval. It ensures a workspace contains a curated MEMORY.md and a memory/ folder with daily logs, projects, groups, and system notes, and configures indexing behavior (indexMode, minScore, maxResults). It also validates provider settings (voyage, openai, or local) and gives steps to verify and troubleshoot memory search results.

When to use it

  • Setting up memory for a new Moltbot/Clawdbot agent
  • Fixing a bot that keeps forgetting past conversations (goldfish brain)
  • Configuring memorySearch options like provider, minScore, or maxResults
  • Creating or improving long-term MEMORY.md and daily logs
  • Switching embedding providers or troubleshooting provider errors

Best practices

  • Enable memorySearch.enabled: true and restart the gateway after changes
  • Keep a concise, curated MEMORY.md at workspace root for high-quality long-term memory
  • Use daily logs in memory/logs/YYYY-MM-DD.md to capture decisions and follow-ups
  • Start with minScore ~0.3 and maxResults 20, lower minScore to broaden results if needed
  • Prefer 'voyage' or 'openai' for managed embeddings; use 'local' when no API keys are available

Example use cases

  • Agent recalls project decisions and avoids asking repeat questions about status
  • Daily standup notes added to logs are searchable for follow-up action items
  • Switching provider to local to run without cloud API keys during offline demos
  • Lowering minScore to surface more historical context when answers seem sparse
  • Verifying memory search by asking the agent what it remembers about a past topic

FAQ

What files must exist for memory to work?

Ensure MEMORY.md exists at the workspace root and the memory/ folder contains logs or other .md files; the config must have memorySearch.enabled set to true.

Why are search results irrelevant?

Try lowering minScore (e.g., to 0.2), increasing maxResults, and improving the clarity of memory files; also confirm the chosen provider is working and API keys are set.