openclaw agent
Execute a single agent interaction through the OpenClaw Gateway.Usage
Options
The message or prompt to send to the agent
Recipient identifier (E.164 phone number, user ID, etc.)
Explicit session ID to use or create
Session key for routing (format: agent:sessionId)
Agent ID to use for this interaction
Thinking level:
off, low, medium, high, or xhighControls how much reasoning the agent performs before responding.One-time thinking level override (same values as —thinking)
Verbose output level:
on, full, or offTimeout in seconds (0 means no timeout)
Deliver the response to the recipient via their channel
Message ID to reply to
Thread ID for threaded conversations
Message channel (telegram, discord, slack, etc.)
Override channel for reply delivery
Agent lane identifier for routing
Custom run ID for tracking (defaults to session ID)
Additional system prompt to inject
Comma-separated list of image file paths to include
Thinking Levels
The--thinking flag controls the agent’s reasoning process:
- off: No explicit reasoning, direct responses
- low: Minimal reasoning for simple queries
- medium: Moderate reasoning for typical tasks
- high: Deep reasoning for complex problems
- xhigh: Extended reasoning (only for supported models)
The
xhigh thinking level is only available for specific models like o1-preview and o1-mini.Delivery Options
By default, agent responses are printed to stdout. Use--deliver to send responses through the configured channel:
Examples
Session Persistence
Agent conversations are automatically persisted to session files. Each session maintains:- Conversation history
- Model preferences
- Thinking level settings
- Skills snapshot
- Authentication profile
~/.openclaw/sessions/ by default.
Model Selection
The agent uses the configured default model unless overridden in the session. To change models:Error Handling
If an agent turn fails, the CLI returns a non-zero exit code:Environment Variables
Default timeout in seconds for agent operations
Default thinking level (off, low, medium, high, xhigh)

