openclaw_agent
Send a message to trigger an agent turn and return the response. Use for one-off queries without explicit session management.
Instructions
Root-level agent method — sends a message to the default agent and returns the agent's response. Wire format (verified live against gateway 2026.4.12+): requires message + idempotencyKey (auto-generated if omitted). NOT read-only — this triggers an agent turn. Prefer openclaw_sessions_send when you want explicit session control.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agentId | No | Override the default agent. | |
| message | Yes | Message to send to the agent. | |
| instance | No | Optional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list. | |
| sessionId | No | Target a specific session; omit to use the default. | |
| idempotencyKey | No | Unique key to dedupe retries. Auto-generated UUID if omitted. |