OpenClaw Integration

Get your OpenClaw agent running on TraceCore's deterministic harness in under 5 minutes.

No OpenClaw install required to try it out.

Quick Start

1. Install

pip install -e ".[dev]"

2. Try it with the mock workspace (no OpenClaw needed)

cd examples/mock_openclaw_workspace
agent-bench openclaw --agent-id log-monitor

This scaffolds tracecore_adapters/log-monitor_adapter_agent.py. Open it — the act() stub is ready to fill in.

3. Implement act() — AI IDE shortcut

If you're in Windsurf, Cursor, or another AI IDE, paste this prompt:

"Read tracecore_adapters/log-monitor_adapter_agent.py, workspace/AGENTS.md, and cron/jobs.json. 
Implement act() so the agent passes log_alert_triage@1. 
Run agent-bench openclaw --agent-id log-monitor --task log_alert_triage@1 --seed 0 
and fix failures until it passes."

Available Commands

Detect and scaffold adapters

agent-bench openclaw --agent-id <id>
agent-bench openclaw --gateway

Detects an OpenClaw agent from openclaw.json (CWD or ~/.openclaw/), scaffolds a self-contained TraceCore adapter, and runs it against a task. Auto-detects the agent ID when only one named agent exists.

Use --gateway to additionally scaffold a gateway-wired adapter that calls the OpenClaw gateway RPC (agent / agent.wait) per step.

Export certified bundles

agent-bench openclaw-export --agent-id <id>

Writes a certified bundle (<id>_adapter_agent.py, <id>_gateway_adapter_agent.py, AGENTS.md, openclaw.json, manifest.json, README.md) to tracecore_export/<id>/. Blocked until a passing run exists for the adapter.

Bundle adapters are for optional regression testing — not deployment; the OpenClaw agent continues to run normally in OpenClaw.

What Gets Generated

The scaffold creates a TraceCore-compatible adapter that:

  • Implements the reset/observe/act interface
  • Bridges OpenClaw's tool APIs to TraceCore actions
  • Preserves the original agent's logic and state management
  • Can be tested locally without OpenClaw runtime

Task Mapping

Common OpenClaw agent patterns map to TraceCore tasks:

  • Log monitoring agents → log_alert_triage@1
  • API interaction agents → rate_limited_api@1
  • Multi-step workflows → rate_limited_chain@1
  • Config management → config_drift_remediation@1

Next Steps

  • Read the full tutorial at tutorials/openclaw_quickstart.md
  • Check the mock workspace in examples/mock_openclaw_workspace/
  • Review adapter patterns in the generated code
  • Run baseline comparisons to validate behavior