OpenClaw Plugin Guide
Use the OpenClaw plugin when OpenClaw owns the agent, tool, and LLM lifecycle that needs NeMo Relay observability. The plugin observes supported OpenClaw plugin hooks and converts them into NeMo Relay sessions, LLM spans, tool spans, and marks that the generic NeMo Relay observability component can export as Agent Trajectory Interchange Format (ATIF) JSON, OpenTelemetry spans, OpenInference/Phoenix spans, and adaptive telemetry inputs.
This public OpenClaw plugin uses OpenClaw public hooks. It can initialize
generic NeMo Relay plugin components such as observability and adaptive, and
it can run pre-tool conditional guardrails when OpenClaw invokes the before-tool
hook. Hook-backed mode does not rewrite provider routing or model requests. For
middleware-backed behavior that changes execution, use the patch-based OpenClaw
integration from the NeMo Relay repository.
Use this guide to install the plugin, enable it in OpenClaw, configure telemetry outputs, verify exported traces, and understand current LLM replay fidelity.
Requirements
Required:
- OpenClaw
2026.5.26or newer. - The OpenClaw CLI available as
openclaw.
Optional:
- Node.js and npm when installing or managing the package directly.
- A Phoenix instance or OTLP collector when exporting OpenInference or OpenTelemetry spans.
Install
Install the plugin with OpenClaw so OpenClaw can register and manage it:
OpenClaw uses the package nemo-relay-openclaw for installation and the plugin
manifest ID nemo-relay for configuration. Use nemo-relay in
plugins.allow, plugins.entries, plugins inspect, and gateway status
commands.
If you manage OpenClaw plugin dependencies directly in a Node.js project, install the package with npm:
Installing with npm makes the package available to that project. Use
openclaw plugins install when you want OpenClaw to register and manage the
plugin.
Enable and Configure the Plugin
Add the nemo-relay plugin ID to plugins.allow, grant conversation hook
access, and place the OpenClaw plugin configuration under
plugins.entries["nemo-relay"].config:
This example enables local ATIF export and leaves OTLP exporters disabled until
you point them at a collector or Phoenix endpoint. Remove exporter sections you
do not use, or set their enabled fields to false.
plugins.allowcontrols OpenClaw plugin trust and loading. Includenemo-relaywhen OpenClaw runs with restrictive plugin settings.plugins.entries["nemo-relay"].enabledcontrols whether OpenClaw starts this plugin entry.hooks.allowConversationAccesslets trusted non-bundled plugins receive conversation-sensitive hook payloads such as LLM prompts, LLM responses, agent finalization messages, and tool payloads.config.enableddisables or enables the NeMo Relay OpenClaw wrapper without removing the plugin entry.config.backendcurrently supports onlyhooks.config.pluginsis the generic NeMo Relay plugin configuration document. Use this object to configure built-in components such asobservabilityandadaptive.config.plugins.components[].config.atifwrites ATIF trajectory JSON files. Setoutput_directoryto the directory where OpenClaw should write files.config.plugins.components[].config.opentelemetrysends generic OTLP spans to an OpenTelemetry collector whenenabledistrue.config.plugins.components[].config.openinferencesends OpenInference OTLP spans to Phoenix or another OpenInference-compatible collector whenenabledistrue.config.plugins.components[]entries withkind: "adaptive"initialize the Adaptive plugin. In hook-backed OpenClaw mode, adaptive telemetry can consume replayed NeMo Relay events, while request-rewrite features such as adaptive hints require a managed execution path.config.capturecontrols prompt, response, tool argument, and tool result capture. Tool arguments and tool results are stripped by default because they often contain user data, local paths, tokens, or large payloads.config.correlationcontrols bounded in-memory hook correlation. By default, the plugin waits 250 ms for a matchingllm_inputafter anllm_output, keeps correlation records for 600 seconds, and keeps at most 32 records per correlation key.
Restart the gateway after changing plugin configuration:
Configuration Key Names
The OpenClaw wrapper owns enabled, backend, capture, and correlation.
The top-level plugins object inside the wrapper is the generic NeMo Relay
plugin configuration document.
OpenClaw wrapper fields such as includePrompts and llmOutputGraceMs follow
the OpenClaw plugin schema. Fields inside config.plugins are NeMo Relay generic
plugin configuration, so they use snake_case regardless of language.
Missing observability sections are disabled. Plugin-host validation or
initialization errors degrade the NeMo Relay runtime as a whole, and the status
method reports configured output health from the generic observability
component. See
Observability Configuration
for the complete observability component schema and exporter-specific fields.
Verify the Integration
Inspect the plugin runtime:
This verifies that the plugin package is installed, enabled, importable, and exposes its config schema. It does not prove that every hook and gateway method surface is active in a running gateway.
Run an OpenClaw session with the plugin enabled, then verify the configured sink:
- ATIF: confirm JSON files appear in the configured
config.plugins.components[].config.atif.output_directory. - OpenTelemetry: confirm spans arrive at the configured OTLP collector.
- OpenInference: confirm spans arrive at the configured OpenInference/Phoenix endpoint.
The plugin also registers the operator.admin scoped gateway method
nemoRelay.status. If your CLI is already paired with admin-capable gateway
access, run:
Otherwise, pass your normal admin-capable gateway auth options:
If OpenClaw requests a device scope upgrade for operator.admin, approve it
through the normal OpenClaw device approval flow and retry the status call.
The status response reports backend state, output health for atif, otel,
and openInference, replay counters, and the latest degraded or unavailable
reason when present.
Runtime Mapping
The plugin maps supported OpenClaw hook events into NeMo Relay telemetry, adaptive inputs, and pre-tool conditional guardrail checks.
It does not rewrite provider routing or provider request payloads. Hook-backed adaptive telemetry can learn from replayed events, while request-rewrite features such as adaptive hints require a managed execution path.
LLM Replay Fidelity
OpenClaw currently exposes request, response, message-write, and provider timing details through separate hook events. The plugin correlates those events within the same session, provider, model, and run.
When model timing cannot be safely paired with an assistant turn, the plugin emits diagnostic marks instead of inventing latency. This keeps traces honest and makes current fidelity boundaries explicit.
When OpenClaw provides usage data, the plugin maps input, output, total, cache read, cache write, and cost fields into OpenInference-friendly usage fields.
Troubleshooting
If the plugin does not load:
- verify the package was installed with
openclaw plugins install - verify
plugins.allowincludesnemo-relay - verify
plugins.entries["nemo-relay"].enabledis not disabled - restart the gateway after config changes
If conversation payloads are missing:
- verify
hooks.allowConversationAccessis enabled for the plugin - verify the OpenClaw session emits the relevant LLM, message-write, and tool hooks
If tool spans exist but LLM spans are incomplete:
- verify
llm_inputandllm_outputhooks are emitted - verify
before_message_writehooks are emitted when relying on assistant-turn replay - verify
model_call_startedandmodel_call_endedhooks are emitted when timing attribution is expected - check diagnostic marks for ambiguous or unpaired timing records
If no export output appears:
- verify
config.plugins.components[].config.atif.output_directory,config.plugins.components[].config.opentelemetry.endpoint, orconfig.plugins.components[].config.openinference.endpoint - verify the configured collector or output directory is reachable
- verify session end or gateway stop hooks fired so pending replay state can drain
If ambiguous timing marks appear, treat them as expected conservative behavior. The plugin avoids attaching unsafe latency when multiple timing candidates could match the same assistant turn.
Known Limitations
Current OpenClaw public hooks are separate event streams, so some LLM timing attribution is best-effort. If a matching request hook is missing, the plugin may replay an LLM output with a placeholder request after the configured grace window. If timing is ambiguous, the plugin emits diagnostic marks instead of unsafe latency.