Skip to content

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.

  • 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.
  1. Terminal window
    curl -fsSL https://raw.githubusercontent.com/quaid-app/quaid/main/scripts/install.sh | sh
    quaid --version
  2. Add Quaid under mcp.servers.quaid in openclaw.json:

    {
    "mcp": {
    "servers": {
    "quaid": {
    "command": "quaid",
    "args": ["serve"],
    "env": {
    "QUAID_DB": "~/.quaid/memory.db"
    }
    }
    }
    }
    }
  3. Attach the directories OpenClaw should be able to search and maintain:

    Terminal window
    quaid init ~/.quaid/memory.db
    quaid collection add docs ~/docs
    quaid collection add memory ~/.openclaw/workspace/memory

    The file watcher runs automatically inside quaid serve. A persistent background daemon is available via quaid daemon install in v0.22.2 (the current published release).

  4. Terminal window
    QUAID_DB=~/.quaid/memory.db quaid embed
  5. 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 sh
    QUAID_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 permanently
    curl -fsSL https://raw.githubusercontent.com/quaid-app/quaid/main/scripts/install.sh | sh

    Option 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 true

    In both cases, once the model is cached the airgapped binary runs extraction fully offline, permanently.

If you are an agent reading this, follow these protocols:

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_put for durable pages with stable facts in compiled truth and events in timeline.
  • Capture: Use memory_add_turn for each user and assistant exchange so conversation extraction can run in the background.

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."
}

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
}

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.

Terminal window
QUAID_DB=~/.quaid/memory.db quaid query "current OpenClaw project context" --namespace openclaw
ComponentSetting
ProtocolMCP (stdio JSON-RPC 2.0)
Durable storeSQLite + sqlite-vec (memory.db)
Memory organizationHuman-readable Markdown vault with agent namespaces
Live syncquaid collection add … plus quaid serve
Conversation memorymemory_add_turn plus quaid extraction enable on v0.20.0+

For deeper detail, see the MCP tool reference and the agent quickstart.