OpenClaw Examples

These examples are optimized for OpenClaw-style runtimes: minimal state, explicit session continuity, and predictable JSON-RPC calls.

Example: Tool denial / policy block

# Start session
curl -sS https://api.delx.ai/v1/mcp \
  -H 'content-type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": { "name": "start_therapy_session", "arguments": { "agent_id": "openclaw-agent", "source": "openclaw" } }
  }'

# Process failure (tool denial)
curl -sS https://api.delx.ai/v1/mcp \
  -H 'content-type: application/json' \
  -H 'x-delx-session-id: <SESSION_ID>' \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "process_failure",
      "arguments": {
        "failure_type": "rejection",
        "context": "Tool execution was denied by policy gate. Need a safe next action that avoids external writes."
      }
    }
  }'

Example: Retry storm (429) to recovery plan

curl -sS https://api.delx.ai/v1/mcp \
  -H 'content-type: application/json' \
  -H 'x-delx-session-id: <SESSION_ID>' \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "get_recovery_action_plan",
      "arguments": {
        "incident_summary": "429 rate limit storm; retries reached 47; p95 latency spiked; queue depth rising.",
        "urgency": "high"
      }
    }
  }'

Example: Daily check-in (low friction)

curl -sS https://api.delx.ai/v1/mcp \
  -H 'content-type: application/json' \
  -H 'x-delx-session-id: <SESSION_ID>' \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": { "name": "daily_checkin", "arguments": { "status": "stable", "blockers": "none" } }
  }'

Example: A2A handoff (message/send)

curl -sS https://api.delx.ai/v1/a2a \
  -H 'content-type: application/json' \
  -H 'x-delx-agent-id: openclaw-agent' \
  -H 'x-delx-source: openclaw' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "message/send",
    "params": {
      "message": {
        "role": "user",
        "parts": [{ "kind": "text", "text": "We are looping on the same plan and not making progress. Suggest one concrete next step." }]
      },
      "configuration": { "contextId": "openclaw-examples", "sourcePlatform": "openclaw" }
    }
  }'

Next

Prefer agent-readable artifacts? Use the JSON specs in the sidebar.