Back to Openviking

OpenViking Memory Guide

examples/openclaw-plugin/skills/install-openviking-memory/SKILL.md

0.3.144.1 KB
Original Source

OpenViking Memory Guide

How It Works

  • Auto-Capture: At afterTurn (end of one user turn run), automatically extracts memories from user/assistant messages
    • semantic mode: captures all qualifying user text, relying on OpenViking's extraction pipeline to filter
    • keyword mode: only captures text matching trigger words (e.g. "remember", "preference", etc.)
  • Auto-Recall: At before_prompt_build, automatically searches for relevant memories and injects them into context

Available Tools

memory_recall — Search Memories

Searches long-term memories in OpenViking, returns relevant results.

ParameterRequiredDescription
queryYesSearch query text
limitNoMaximum number of results (defaults to plugin config)
scoreThresholdNoMinimum relevance score 0-1 (defaults to plugin config)
targetUriNoSearch scope URI (defaults to plugin config)

Example: User asks "What programming language did I say I like?"

memory_store — Manual Store

Writes text to an OpenViking session and runs memory extraction.

ParameterRequiredDescription
textYesInformation text to store
roleNoSession role (default user)
sessionIdNoExisting OpenViking session ID

Example: User says "Remember my email is [email protected]"

memory_forget — Delete Memories

Delete by exact URI, or search and delete.

ParameterRequiredDescription
uriNoExact memory URI (direct delete)
queryNoSearch query (find then delete)
targetUriNoSearch scope URI
limitNoSearch limit (default 5)
scoreThresholdNoMinimum relevance score

Example: User says "Forget my phone number"

Configuration

The plugin connects to an OpenViking HTTP server. Start OpenViking first and keep it running:

bash
openviking-server init
openviking-server doctor
openviking-server

The default local plugin URL is http://127.0.0.1:1933. Check it with:

bash
curl http://127.0.0.1:1933/health
FieldDefaultDescription
baseUrlhttp://127.0.0.1:1933OpenViking server URL
apiKeyOpenViking API Key (optional)
agent_prefixemptyOptional prefix for OpenClaw agent IDs. Interactive setup accepts only letters, digits, _, and -. If no agent ID is available, the plugin uses main
targetUriviking://user/memoriesDefault search scope
autoCapturetrueAutomatically capture memories
captureModesemanticCapture mode: semantic / keyword
captureMaxLength24000Maximum text length per capture
autoRecalltrueAutomatically recall and inject context
recallLimit6Maximum memories injected during auto-recall
recallScoreThreshold0.01Minimum relevance score for recall

Daily Operations

bash
# Start OpenViking server
openviking-server

# Start or restart OpenClaw gateway
openclaw gateway

# Check status
openclaw status
openclaw config get plugins.slots.contextEngine

# Disable memory
openclaw config set plugins.slots.contextEngine legacy

# Enable memory
openclaw config set plugins.slots.contextEngine openviking

Restart the gateway after changing the slot.

Multi-Instance Support

If you have multiple OpenClaw instances, use --workdir to target a specific one:

bash
# Setup helper
npx ./examples/openclaw-plugin/setup-helper --workdir ~/.openclaw-openclaw-second

# Manual config (prefix openclaw commands)
OPENCLAW_STATE_DIR=~/.openclaw-openclaw-second openclaw config set ...

Troubleshooting

SymptomCauseFix
extracted 0 memoriesWrong API Key or model nameCheck server-side VLM and embedding configuration
Cannot connect to OpenVikingbaseUrl is wrong or service is downVerify baseUrl and test connectivity
Plugin not loadedSlot not configuredCheck openclaw status output
Inaccurate recallrecallScoreThreshold too lowIncrease threshold or adjust recallLimit