Integrations

OpenClaw Adapter

Native OpenClaw plugin hooks for context capture, model I/O, tool lifecycle capture, fixture decisions, and synthetic tool outputs.

@isplay/adapter-openclaw is the strongest current runtime adapter because OpenClaw plugin hooks can expose prompt/model/tool boundaries before execution.

Install for OpenClaw

npm install isplay @isplay/sdk @isplay/adapter-openclaw

Exports

ExportPurpose
createOpenClawAdapter(options?)Returns adapter kit plus capabilities, register(api), and handleHook(name, event).
registerIsplayOpenClaw(api, adapter?)Registers known OpenClaw hooks at priority 100.
openClawCapabilitiesCapability manifest.
recordOpenClawContext(client, event, modelCallId?)Captures system prompt, messages, and settings as context annotations.

Setup

import { init } from "@isplay/sdk";
import { createOpenClawAdapter } from "@isplay/adapter-openclaw";

init({
  projectId: process.env.ISPLAY_PROJECT_ID!,
  baseUrl: process.env.ISPLAY_API_URL,
});

const isplay = createOpenClawAdapter({
  toolResultMode: "native_synthetic",
  runKey: (event) => String(event.runId ?? event.sessionId ?? event.sessionKey),
});

export default function register(api) {
  isplay.register(api);
}

Registered Hooks

registerIsplayOpenClaw() registers:

session_start
before_model_resolve
before_prompt_build
before_agent_run
llm_input
llm_output
before_tool_call
after_tool_call
tool_result_persist
before_compaction
after_compaction
agent_end
session_end

Captured Behavior

HookBehavior
llm_inputStarts model call, records provider/model/settings/input, and records context inventory.
llm_outputFinishes model call with output, usage, or error.
before_tool_callRecords proposal and tool start, consults fixture gateway, can block or inject synthetic result.
after_tool_callFinishes tool execution with result or error.
before_prompt_buildCan call contextProvider to contribute prompt context.
agent_end / session_endFinishes runtime run as ok or error.
other hooksRecorded as openclaw.<hook> events.

Synthetic Fixture Mode

When toolResultMode: "native_synthetic" and the fixture gateway returns inject, before_tool_call can return:

{
  "result": { "fixture": "output" },
  "skipExecution": true,
  "provenance": "isplay_fixture"
}

Only use this mode with an OpenClaw build that honors skipExecution and returns the synthetic output without running the real tool.

Context Capture

recordOpenClawContext() captures:

  • systemPrompt as system_message.
  • messages as user, assistant, or tool context items.
  • model settings as model_setting.

These annotations are linked to the model call when available.

Capabilities

OpenClaw manifest status is native_full, with a caveat that model replay still needs an isplay provider proxy or synthetic model hook.

PrimitiveStatusMode
Context inventorynative_fullnative_replace
Prompt patchnative_fullnative_replace
Model capturenative_fullobserve_only
Model replaymanaged_replayproxy_replace
Tool capturenative_fullobserve_only
Tool fixture replaymanaged_replaynative_replace
Checkpointingmanaged_replayobserve_only

Warnings

  • Plugin-only mode cannot undo side effects from tools already executed.
  • native_synthetic requires runtime support for synthetic before-tool results.
  • Session transcripts and compaction hooks support sidecar checkpoints, but formal fork APIs remain runtime-owned.

On this page