Back to Openviking

OpenClaw Plugin

docs/en/agent-integrations/03-openclaw.md

0.4.185.9 KB
Original Source

OpenClaw Plugin

Add long-term memory to OpenClaw. After installation, OpenClaw automatically remembers important facts from conversations and recalls relevant context before every reply.

Source: examples/openclaw-plugin

Prerequisites

ComponentRequired Version
Node.js>= 22
OpenClaw>= 2026.5.27

The plugin connects to a running OpenViking server — see the Deployment Guide if you need one.

<details> <summary><b>Upgrading from the legacy <code>memory-openviking</code> plugin?</b></summary>

The old plugin is not compatible. Run the cleanup script first:

bash
curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/openclaw-plugin/upgrade_scripts/cleanup-memory-openviking.sh -o cleanup-memory-openviking.sh
bash cleanup-memory-openviking.sh
</details>

Install

bash
openclaw plugins install clawhub:@openviking/openclaw-plugin
openclaw openviking setup --base-url http://your-server:1933 --api-key sk-xxx --json
openclaw gateway restart

The setup wizard writes configuration and activates the plugin. After install, start a conversation — OpenClaw will begin remembering and recalling automatically.

<details> <summary><b>Alternative: install via <code>ov-install</code></b></summary>

If ClawHub is unavailable:

bash
npm install -g openclaw-openviking-setup-helper
ov-install --base-url http://your-server:1933

Key parameters:

ParameterMeaning
--workdir PATHOpenClaw data directory (default ~/.openclaw)
--plugin-version=VERPlugin version: npm version, dist-tag, or Git ref
--base-url URLOpenViking server URL
--api-key KEYOpenViking API key
--peer-role ROLEMemory scope: none, assistant, or sender (person is a legacy alias)
--uninstallUninstall the plugin

Full parameter list in the install guide.

</details>

Choose the Memory Scope

peer_role decides whether long-term memory is shared at the OpenViking user level or attributed to a concrete peer:

ValueMemory layoutUse case
none (default)Shared memory at viking://user/<user_id>/memories/...; no peer-specific memory subtree is usedGeneral-purpose setup where all conversations for this OpenViking user share user-level memory
assistantAssistant-attributed peer memory at viking://user/<user_id>/peers/<assistant_id>/memories/...Human as OpenViking user: separate the peer memories of assistants such as main and research
senderSender-attributed peer memory at viking://user/<user_id>/peers/<sender_id>/memories/...Agent as OpenViking user: separate the peer memories of senders such as customer-42 and customer-99

For example:

bash
# Alice is the OpenViking user; separate memories by OpenClaw assistant.
openclaw openviking setup --base-url http://your-server:1933 --api-key sk-xxx --peer-role assistant --json

# support-agent is the OpenViking user; separate memories by human sender.
openclaw openviking setup --base-url http://your-server:1933 --api-key sk-xxx --peer-role sender --json

New configuration should use sender; existing peer_role=person configurations remain compatible and are treated as sender. OpenViking initializes the managed peers/ container for every user, so none means that no concrete peers/<peer_id>/memories subtree is used. Actor-peer recall includes shared user memory plus the current peer memory, and changing the scope does not move existing memories.

Verify

bash
openclaw openviking status

This checks plugin registration, server connectivity, and version compatibility in one command. Append --json for machine-readable output.

<details> <summary><b>Manual verification</b></summary>

Check the plugin owns the contextEngine slot:

bash
openclaw config get plugins.slots.contextEngine
# expect: openviking

For an end-to-end pipeline test:

bash
python examples/openclaw-plugin/health_check_tools/ov-healthcheck.py

See HEALTHCHECK.md for details.

</details> <details> <summary><b>Configuration</b></summary>

Plugin config lives under plugins.entries.openviking.config. Setup usually writes this for you.

ParameterDefaultMeaning
baseUrlhttp://127.0.0.1:1933OpenViking server endpoint
apiKeyemptyOpenViking API key
peer_rolenonenone, assistant, or sender; legacy person is accepted as sender
peer_prefixemptyOptional prefix for assistant peer identity when peer_role=assistant
autoRecallTimeoutMs5000Outer timeout (ms) for the whole auto-recall flow; increase for slow local embedding hardware (clamped 1000–300000)
bash
openclaw config set plugins.entries.openviking.config.baseUrl http://your-server:1933
openclaw config set plugins.entries.openviking.config.apiKey your-api-key
</details>

Uninstall

bash
curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/examples/openclaw-plugin/upgrade_scripts/uninstall-openclaw-plugin.sh -o uninstall-openviking.sh
bash uninstall-openviking.sh

See also