Prerequisites
- Node.js v22.14 or later.
- OpenClaw
2026.4.25or later with the plugin API. - A W&B account and API key.
- A Weave project (
[YOUR-TEAM]/[YOUR-PROJECT]) to receive traces.
Install the plugin
Complete the following steps to install the plugin, register it with the OpenClaw gateway, and confirm that traces reach your Weave project.1
Install the package
weave-openclaw (weave on its own is the W&B SDK, not this plugin). The OpenClaw gateway loads the plugin through its config. You don’t import it from application code.2
Add the plugin to your gateway config
The default config location is Set
~/.openclaw/openclaw.json (JSON5, which allows comments and trailing commas). Run openclaw onboard to scaffold one if you don’t have it yet.
Update [YOUR-TEAM] and [YOUR-PROJECT] for your project.hooks.allowConversationAccess to true so OpenClaw runs the content-bearing hooks (llm_input, llm_output, agent_end) and spans include input and output text, tool arguments, and tool results.diagnostics.enabled is on by default. Only set it explicitly if you need to turn it off.3
Restart the gateway and verify
Restart the OpenClaw gateway, then run
/weave status in any OpenClaw chat surface to confirm the plugin is active. Traces appear at https://wandb.ai/[YOUR-TEAM]/[YOUR-PROJECT] within a few seconds of your first agent run.View OpenClaw traces in Weave
Once the plugin is active, each agent session produces a trace you can inspect in the Weave UI. After running at least one agent session, open your project in the Weave UI:- Navigate to https://wandb.ai and select your project.
- In the sidebar menu, select Agents.
- Select the Conversations tab to view all agent conversations saved for your project.
- Select a conversation to inspect the full conversation tree.
Configuration reference
This section is the full configuration reference for theweave plugin entry in openclaw.json.
The apiKey field supports four auth sources, resolved in this order:
- A
SecretRefobject withsource: "env"orsource: "file"(see line 10 in the following example). - A literal
apiKeystring (supported but not recommended). - The
WANDB_API_KEYenvironment variable. - A
~/.netrcentry for the Weave host, populated bywandb login.
captureContent is true by default. When captureContent is true, the plugin also emits input and output messages, tool arguments, and tool results following the gen_ai.input.messages and gen_ai.output.messages payload shape. The plugin stamps subagents, compaction events, loop detection, retry attempts, and context sizing as additional attributes and span events.
Set captureContent to false to turn off capture for compliance or retention policies.
W&B Dedicated Cloud or self-hosted instances
The plugin delegates endpoint and auth to the Weave Node SDK. It reads the following environment variables using the same conventions as the Weave Python and Node SDKs:Troubleshooting
If traces aren’t reaching Weave or content fields are empty, use the following sections to diagnose the most common causes. The gateway log is the terminal output from the process runningopenclaw, or your process manager’s log stream if you daemonized it.
Plugin loaded but no spans show up
- Run
/weave status. If lifecycle isdisabled,config-error, ornot-started, the plugin didn’t activate. Check the gateway log forweave: config.entity is required,weave: configuration error, or[weave] incompatible plugin SDK. - Check you haven’t set
diagnostics.enabled: falsein the gateway config. This field should betrue. - Confirm the entity and project match the URL slug of the Weave project you’re inspecting.
/weave statusshould printproject=[YOUR-TEAM]/[YOUR-PROJECT]. - Confirm the auth source.
/weave statusshould printauth=.... If it saysWANDB_API_KEY envbut you set the key in a different environment variable, the plugin is reading the wrong key.
Spans land but input/output text is empty
Look in the gateway log for:plugins.entries.weave.hooks.allowConversationAccess: true in your config and restart the gateway. Span structure and cost and usage data come through diagnostic events, not hooks, so those keep working even when allowConversationAccess is false.