Skip to main content

Debug API

Run diagnostic commands against a running agent. Only a predefined set of commands is accepted.

Execute a debug command

POST /api/debug
Runs one of the allowlisted commands and returns the command output.

Request body

FieldTypeRequiredDescription
commandstringYesThe command to execute. Must be one of the allowlisted values listed below.
agentIdstringYesThe agent to run the command against

Allowlisted commands

CommandDescription
gateway.restartRestart the agent gateway process
openclaw.doctorRun a full health diagnostic
openclaw.logs.tailTail the most recent log entries
openclaw.statusShow agent status summary
openclaw.config.showDisplay the current agent configuration
openclaw.memory.statsShow memory store statistics
openclaw.skills.listList installed skills
openclaw.channels.statusShow channel connection status
openclaw.cron.listList scheduled cron jobs
openclaw.versionDisplay version information

Response

{
  "command": "openclaw.status",
  "output": "OpenClaw Agent Status\n━━━━━━━━━━━━━━━━━━━━━━\nVersion:     2026.3.23\nUptime:      3d 14h 22m\nStatus:      ACTIVE\n...",
  "exitCode": 0,
  "duration": 342,
  "timestamp": "2026-03-27T15:30:00.000Z"
}
FieldTypeDescription
commandstringThe command that was executed
outputstringThe command output text
exitCodenumberExit code of the command. 0 indicates success.
durationnumberExecution time in milliseconds
timestampstringISO 8601 timestamp when the command completed

Errors

CodeDescription
400Missing required fields: command, agentId — one or both required fields are missing
400Command "..." is not in the allowlist — the command is not one of the ten allowlisted values
400Invalid request body — the request body is not valid JSON

Example

curl -X POST https://agentbot.raveculture.xyz/api/debug \
  -H "Content-Type: application/json" \
  -d '{
    "command": "openclaw.doctor",
    "agentId": "agent_abc123"
  }'