Skip to main content
The Weave plugin for OpenClaw automatically traces every agent session running through the OpenClaw gateway and sends the structured data to Agent Lens. The plugin logs every turn, model call, and tool execution without requiring any application code changes. Use these traces to debug sessions, audit tool usage, and monitor cost and latency across runs. This guide is for OpenClaw gateway operators who want to enable Agent Lens tracing for the agents running behind the gateway. It walks you through how to install the plugin, configure it, view the resulting traces, and troubleshoot common issues.
This is a Weights & Biases Weave plugin. A CoreWeave Forge version isn’t available yet. Traces the plugin sends appear in Agent Lens, because Agent Lens and Weave share the same trace data.
This plugin sends OpenClaw session data to Agent Lens. That data can include user prompts, model responses, tool inputs and outputs, tool results, and conversation history.The plugin doesn’t implement personally identifiable information (PII) scrubbing or sensitive-data redaction. If you need to suppress content capture, set captureContent: false in the plugin config. If you can’t send this data to Agent Lens under your security or compliance requirements, don’t install this plugin.

Prerequisites

  • Node.js v22.14 or later.
  • OpenClaw 2026.4.25 or later with the plugin API.
  • A CoreWeave Forge account and API key.
  • An Agent Lens 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 Agent Lens project.
1

Install the package

Use the full name weave-openclaw (weave on its own is the Weave 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 ~/.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.
Set 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://forge.coreweave.com/agent-lens/[YOUR-TEAM]/[YOUR-PROJECT] within a few seconds of your first agent run.

View OpenClaw traces in Agent Lens

Once the plugin is active, each agent session produces a trace you can inspect in the Agent Lens UI. After running at least one agent session, open your project in the Agent Lens UI:
  1. Navigate to CoreWeave Forge, select Agent Lens from the product menu, and then select your project in the project selector at the top of the side menu.
  2. In the side menu, select Conversations.
  3. Select the Conversations tab to view all agent conversations saved for your project.
  4. Select a conversation to inspect the full conversation tree.
For more information about the Conversations tab, see View agent activity. The plugin emits spans per the OpenTelemetry (OTel) GenAI semantic conventions:

Configuration reference

This section is the full configuration reference for the weave plugin entry in openclaw.json. The apiKey field supports four auth sources, resolved in this order:
  1. A SecretRef object with source: "env" or source: "file" (see line 10 in the following example).
  2. A literal apiKey string (supported but not recommended).
  3. The WANDB_API_KEY environment variable.
  4. A ~/.netrc entry for the Agent Lens host, populated by wandb 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.

Troubleshooting

If traces aren’t reaching Agent Lens 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 running openclaw, or your process manager’s log stream if you daemonized it.

Plugin loaded but no spans show up

  1. Run /weave status. If lifecycle is disabled, config-error, or not-started, the plugin didn’t activate. Check the gateway log for weave: config.entity is required, weave: configuration error, or [weave] incompatible plugin SDK.
  2. Check you haven’t set diagnostics.enabled: false in the gateway config. This field should be true.
  3. Confirm the entity and project match the URL slug of the Agent Lens project you’re inspecting. /weave status should print project=[YOUR-TEAM]/[YOUR-PROJECT].
  4. Confirm the auth source. /weave status should print auth=.... If it says WANDB_API_KEY env but 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:
OpenClaw gates content-bearing hooks behind an operator opt-in. Set 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.

Errors sending traces to Agent Lens

If the plugin is active and generating spans but they don’t appear in Agent Lens, check the gateway log for an export error and match it against the following table.
Last modified on September 30, 2026