{
  "title": "`openclaw agent` (direct agent runs)",
  "content": "`openclaw agent` runs a single agent turn without needing an inbound chat message.\nBy default it goes **through the Gateway**; add `--local` to force the embedded\nruntime on the current machine.\n\n* Required: `--message <text>`\n* Session selection:\n  * `--to <dest>` derives the session key (group/channel targets preserve isolation; direct chats collapse to `main`), **or**\n  * `--session-id <id>` reuses an existing session by id, **or**\n  * `--agent <id>` targets a configured agent directly (uses that agent's `main` session key)\n* Runs the same embedded agent runtime as normal inbound replies.\n* Thinking/verbose flags persist into the session store.\n* Output:\n  * default: prints reply text (plus `MEDIA:<url>` lines)\n  * `--json`: prints structured payload + metadata\n* Optional delivery back to a channel with `--deliver` + `--channel` (target formats match `openclaw message --target`).\n* Use `--reply-channel`/`--reply-to`/`--reply-account` to override delivery without changing the session.\n\nIf the Gateway is unreachable, the CLI **falls back** to the embedded local run.\n\n* `--local`: run locally (requires model provider API keys in your shell)\n* `--deliver`: send the reply to the chosen channel\n* `--channel`: delivery channel (`whatsapp|telegram|discord|googlechat|slack|signal|imessage`, default: `whatsapp`)\n* `--reply-to`: delivery target override\n* `--reply-channel`: delivery channel override\n* `--reply-account`: delivery account id override\n* `--thinking <off|minimal|low|medium|high|xhigh>`: persist thinking level (GPT-5.2 + Codex models only)\n* `--verbose <on|full|off>`: persist verbose level\n* `--timeout <seconds>`: override agent timeout\n* `--json`: output structured JSON",
  "code_samples": [],
  "headings": [
    {
      "level": "h2",
      "text": "Behavior",
      "id": "behavior"
    },
    {
      "level": "h2",
      "text": "Examples",
      "id": "examples"
    },
    {
      "level": "h2",
      "text": "Flags",
      "id": "flags"
    }
  ],
  "url": "llms-txt#`openclaw-agent`-(direct-agent-runs)",
  "links": []
}