Use this file to discover all available pages before exploring further.
Agent
Run an agent turn via the Gateway (use
for embedded).
Use
to target a configured agent directly.
Pass at least one session selector:
Related:
Options
- : required message body
- : recipient used to derive the session key
- : explicit session id
- : agent id; overrides routing bindings
- : model override for this run ( or model id)
- : agent thinking level (, , , , , plus provider-supported custom levels such as , , or )
- : persist verbose level for the session
- : delivery channel; omit to use the main session channel
- : delivery target override
--reply-channel <channel>
: delivery channel override
- : delivery account override
- : run the embedded agent directly (after plugin registry preload)
- : send the reply back to the selected channel/target
- : override agent timeout (default 600 or config value)
- : output JSON
Examples
openclaw agent --to +15555550123 --message "status update" --deliver
openclaw agent --agent ops --message "Summarize logs"
openclaw agent --agent ops --model openai/gpt-5.4 --message "Summarize logs"
openclaw agent --session-id 1234 --message "Summarize inbox" --thinking medium
openclaw agent --to +15555550123 --message "Trace logs" --verbose on --json
openclaw agent --agent ops --message "Generate report" --deliver --reply-channel slack --reply-to "#reports"
openclaw agent --agent ops --message "Run locally" --local
Notes
- Gateway mode falls back to the embedded agent when the Gateway request fails. Use to force embedded execution up front.
- still preloads the plugin registry first, so plugin-provided providers, tools, and channels stay available during embedded runs.
- and embedded fallback runs are treated as one-shot runs. Bundled MCP loopback resources and warm Claude stdio sessions opened for that local process are retired after the reply, so scripted invocations do not keep local child processes alive.
- Gateway-backed runs leave Gateway-owned MCP loopback resources under the running Gateway process; older clients may still send the historical cleanup flag, but the Gateway accepts it as a compatibility no-op.
- , , and affect reply delivery, not session routing.
- keeps stdout reserved for the JSON response. Gateway, plugin, and embedded-fallback diagnostics are routed to stderr so scripts can parse stdout directly.
- Embedded fallback JSON includes
meta.transport: "embedded"
and meta.fallbackFrom: "gateway"
so scripts can distinguish fallback runs from Gateway runs.
- If the Gateway accepts an agent run but the CLI times out waiting for the final reply, embedded fallback uses a fresh explicit session/run id and reports
meta.fallbackReason: "gateway_timeout"
plus the fallback session fields. This avoids racing the Gateway-owned transcript lock or silently replacing the original routed conversation session.
- When this command triggers regeneration, SecretRef-managed provider credentials are persisted as non-secret markers (for example env var names,
secretref-env:ENV_VAR_NAME
, or ), not resolved secret plaintext.
- Marker writes are source-authoritative: OpenClaw persists markers from the active source config snapshot, not from resolved runtime secret values.
Related