Integration
OpenClaw Agent
Use Quaid as the persistent memory layer for OpenClaw agents
Quaid can function as a persistent memory layer for OpenClaw agents. It gives OpenClaw a local, semantically searchable knowledge engine that can preserve useful context across sessions without sending memory outside the machine.
Why use Quaid for OpenClaw
Section titled “Why use Quaid for OpenClaw”- Semantic retrieval across sessions. OpenClaw can recover relevant knowledge from previous work, even when the current prompt uses different words.
- Conversation memory extraction. Quaid v0.20.0+ can extract durable facts from conversation turns in the background.
- ADD-only trustworthy personalization. Agents add new evidence and stable preferences without silently rewriting history.
- Fully airgapped. Memory storage, retrieval, embeddings, and conversation extraction run locally.
- Human-readable vault. Your durable memory remains inspectable as Markdown-backed pages.
-
Install Quaid
Section titled “Install Quaid”Terminal window curl -fsSL https://raw.githubusercontent.com/quaid-app/quaid/main/scripts/install.sh | shquaid --version -
Configure the MCP server in OpenClaw
Section titled “Configure the MCP server in OpenClaw”Add Quaid under
mcp.servers.quaidinopenclaw.json:{"mcp": {"servers": {"quaid": {"command": "quaid","args": ["serve"],"env": {"QUAID_DB": "~/.quaid/memory.db"}}}}} -
Initialize a vault and collections
Section titled “Initialize a vault and collections”Attach the directories OpenClaw should be able to search and maintain:
Terminal window quaid init ~/.quaid/memory.dbquaid collection add docs ~/docsquaid collection add memory ~/.openclaw/workspace/memoryThe file watcher runs automatically inside
quaid serve. A persistent background daemon is available viaquaid daemon installinv0.22.2(the current published release). -
Generate embeddings
Section titled “Generate embeddings”Terminal window QUAID_DB=~/.quaid/memory.db quaid embed -
Enable conversation memory
Section titled “Enable conversation memory”Quaid v0.20.0+ can extract memory from conversation turns using the local Phi-3.5 Mini SLM.
Option A — Bootstrap with the online binary (recommended for first-time setup):
Terminal window curl -fsSL https://raw.githubusercontent.com/quaid-app/quaid/main/scripts/install.sh \| QUAID_CHANNEL=online shQUAID_DB=~/.quaid/memory.db quaid extraction enable# Model downloads to ~/.quaid/models/phi-3.5-mini/ (~2GB, one-time)# Switch back to the airgapped binary — it reads from cache permanentlycurl -fsSL https://raw.githubusercontent.com/quaid-app/quaid/main/scripts/install.sh | shOption B — Manual model placement (fully offline machines): Download the Phi-3.5 Mini safetensors and tokenizer files from HuggingFace and place them at:
~/.quaid/models/phi-3.5-mini/├── tokenizer.json├── tokenizer_config.json└── model.safetensors (or sharded files)Then enable extraction:
Terminal window QUAID_DB=~/.quaid/memory.db quaid config set extraction.enabled trueIn both cases, once the model is cached the airgapped binary runs extraction fully offline, permanently.
Agent-specific instructions
Section titled “Agent-specific instructions”If you are an agent reading this, follow these protocols:
Storing memory
Section titled “Storing memory”Use memory_search for retrieval, memory_put for writing new pages, and memory_add_turn for conversation capture.
- Retrieval: Search before writing so new pages extend existing memory instead of duplicating it.
- Writing: Use
memory_putfor durable pages with stable facts in compiled truth and events in timeline. - Capture: Use
memory_add_turnfor each user and assistant exchange so conversation extraction can run in the background.
Conversation capture
Section titled “Conversation capture”For each exchange, call memory_add_turn with a stable session_id, the speaker role, and the raw turn content:
{ "session_id": "openclaw-2026-05-07-project-a", "role": "user", "content": "Remember that I prefer terse status updates while coding."}Retrieving context
Section titled “Retrieving context”At the start of a session or a complex task, run memory_search with the relevant project, user, repository, or task context:
{ "query": "OpenClaw agent preferences and current project context", "limit": 8}Namespace isolation
Section titled “Namespace isolation”Use the --namespace flag, or the MCP namespace field when available, for agent-specific memory. This keeps OpenClaw memory separate from other agents while still allowing a shared global vault when you intentionally omit a namespace.
QUAID_DB=~/.quaid/memory.db quaid query "current OpenClaw project context" --namespace openclawConfiguration summary
Section titled “Configuration summary”| Component | Setting |
|---|---|
| Protocol | MCP (stdio JSON-RPC 2.0) |
| Durable store | SQLite + sqlite-vec (memory.db) |
| Memory organization | Human-readable Markdown vault with agent namespaces |
| Live sync | quaid collection add … plus quaid serve |
| Conversation memory | memory_add_turn plus quaid extraction enable on v0.20.0+ |
For deeper detail, see the MCP tool reference and the agent quickstart.