mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 23:40:45 +00:00
Merged via squash.
Prepared head SHA: 4a065ef5d8
Co-authored-by: joshavant <830519+joshavant@users.noreply.github.com>
Co-authored-by: joshavant <830519+joshavant@users.noreply.github.com>
Reviewed-by: @joshavant
30 lines
1.1 KiB
Markdown
30 lines
1.1 KiB
Markdown
---
|
|
summary: "CLI reference for `openclaw agent` (send one agent turn via the Gateway)"
|
|
read_when:
|
|
- You want to run one agent turn from scripts (optionally deliver reply)
|
|
title: "agent"
|
|
---
|
|
|
|
# `openclaw agent`
|
|
|
|
Run an agent turn via the Gateway (use `--local` for embedded).
|
|
Use `--agent <id>` to target a configured agent directly.
|
|
|
|
Related:
|
|
|
|
- Agent send tool: [Agent send](/tools/agent-send)
|
|
|
|
## Examples
|
|
|
|
```bash
|
|
openclaw agent --to +15555550123 --message "status update" --deliver
|
|
openclaw agent --agent ops --message "Summarize logs"
|
|
openclaw agent --session-id 1234 --message "Summarize inbox" --thinking medium
|
|
openclaw agent --agent ops --message "Generate report" --deliver --reply-channel slack --reply-to "#reports"
|
|
```
|
|
|
|
## Notes
|
|
|
|
- When this command triggers `models.json` regeneration, SecretRef-managed provider credentials are persisted as non-secret markers (for example env var names, `secretref-env:ENV_VAR_NAME`, or `secretref-managed`), not resolved secret plaintext.
|
|
- Marker writes are source-authoritative: OpenClaw persists markers from the active source config snapshot, not from resolved runtime secret values.
|