Skip to main content

Documentation Index

Fetch the complete documentation index at: https://opensre.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

OpenSRE integrates with OpenClaw in a native, one-way support loop:
  • OpenSRE can search recent OpenClaw conversations during an investigation.
  • OpenSRE can read full OpenClaw threads for extra engineering context.
  • OpenSRE writes completed RCA findings back into OpenClaw through the OpenClaw bridge.
OpenSRE no longer ships a separate opensre-mcp command. You do not need to register OpenSRE itself as an MCP server inside OpenClaw.

Setup

0. Preflight the local OpenClaw CLI

Before you onboard OpenClaw in OpenSRE, make sure the OpenClaw CLI itself is healthy in the same shell:
node -v
openclaw --help
openclaw gateway status
Expected result:
  • node -v shows Node v22.12+ or newer
  • openclaw --help exits cleanly
  • openclaw gateway status does not fail immediately
If you use nvm, the safe sequence is:
nvm install 22
nvm use 22
node -v
openclaw --help
nvm alias default 22 only affects future shells. It does not switch the current shell that launches uv run opensre.

1. Install and configure OpenSRE locally

make install
uv run opensre onboard

2. Configure the OpenSRE → OpenClaw bridge

Use the guided wizard:
uv run opensre onboard
Or use the direct integration setup command:
uv run opensre integrations setup openclaw
uv run opensre integrations verify openclaw
Recommended bridge settings:
OPENCLAW_MCP_MODE=stdio
OPENCLAW_MCP_COMMAND=openclaw
OPENCLAW_MCP_ARGS="mcp serve"

3. Verify the bridge

From the repo root:
uv run opensre integrations verify openclaw
uv run opensre health

4. Run a smoke test

Use the bundled OpenClaw fixture directly:
uv run opensre investigate -i tests/fixtures/openclaw_test_alert.json
If verification still fails, the next manual checks are:
openclaw gateway status
openclaw gateway run
uv run opensre integrations verify openclaw

Write-back behavior

After every completed investigation, OpenSRE attempts to write the full RCA report back into OpenClaw.
  • If the investigation state contains an openclaw_context.conversation_id, OpenSRE first tries to append the result to that conversation.
  • Otherwise, OpenSRE creates a new OpenClaw conversation containing the RCA report, root cause, remediation steps, and confidence score.

Investigation behavior

When OpenClaw is configured, OpenSRE now prefers the high-signal conversation actions first:
  • search_openclaw_conversations to find recent related context
  • get_openclaw_conversation to read the full thread
  • send_openclaw_message to append a concrete follow-up
The lower-level raw bridge tools remain available, but they are treated as fallback paths instead of the default investigation path.

Accurate RCA

OpenClaw improves RCA quality by supplying engineering context, but OpenClaw alone is not enough for a strong investigation. For accurate RCA, also configure at least one of these:
  • Grafana or Datadog for metrics/logs/traces
  • AWS for infra topology and runtime state
  • GitHub for deploy/code-change context
A good local validation sequence is:
uv run opensre integrations verify openclaw
uv run opensre integrations verify grafana
uv run opensre integrations verify github
uv run opensre investigate -i tests/fixtures/openclaw_test_alert.json
Contributor-facing regression coverage for this path lives in:
  • tests/test_openclaw_integration.py
  • tests/tools/test_openclaw_mcp_tool.py
  • tests/utils/test_openclaw_delivery.py
  • tests/e2e/openclaw/ (e2e suite — see the “End-to-end tests” section below)

Environment variables

VariableMeaningDefault
OPENCLAW_MCP_MODEOpenClaw bridge transport: stdio, streamable-http, or ssestreamable-http
OPENCLAW_MCP_COMMANDExecutable used for stdio modeopenclaw
OPENCLAW_MCP_ARGSSpace-separated arguments for stdio modemcp serve
OPENCLAW_MCP_URLRemote MCP endpoint for streamable-http or ssenone
OPENCLAW_MCP_AUTH_TOKENOptional bearer token for remote MCP transportsempty

Troubleshooting

  • OpenClaw bridge validation failed: Node.js ... is required: switch the current shell to Node 22.12+ or newer. With nvm: nvm install 22 && nvm use 22 && nvm alias default 22. With Homebrew: brew install node@22 && brew link --overwrite node@22. Then re-run openclaw --help before retrying onboarding.
  • uv run opensre integrations verify openclaw fails against http://127.0.0.1:18789/: that URL is the OpenClaw Control UI/Gateway, not the MCP bridge. Use stdio mode with openclaw mcp serve.
  • search_openclaw_conversations or write-back fails with Connection closed or ECONNREFUSED: the OpenClaw Gateway is not running. Check openclaw gateway status, then run openclaw gateway run.
  • Command not found: openclaw: install the OpenClaw CLI or point OPENCLAW_MCP_COMMAND at the full executable path.

End-to-end tests

The OpenClaw e2e suite lives at tests/e2e/openclaw/. See its README for prerequisites, how to run the suite, scenario layout, and CI behavior.