2025-12-09 17:51:05 +00:00
---
2026-01-04 14:32:47 +00:00
summary: "Design notes for a direct `clawdbot agent` CLI subcommand without WhatsApp delivery"
2025-12-09 17:51:05 +00:00
read_when:
- Adding or modifying the agent CLI entrypoint
---
2026-01-04 14:32:47 +00:00
# `clawdbot agent` (direct-to-agent invocation)
2025-12-04 17:53:37 +00:00
2026-01-04 14:32:47 +00:00
`clawdbot agent` lets you talk to the **embedded** agent runtime directly (no chat send unless you opt in), while reusing the same session store and thinking/verbose persistence as inbound auto-replies.
2025-12-04 17:53:37 +00:00
## Behavior
- Required: `--message <text>`
- Session selection:
2025-12-17 11:29:12 +01:00
- If `--session-id` is given, reuse it.
2026-01-03 23:57:17 +00:00
- Else if `--to <e164>` is given, derive the session key from `session.scope` (direct chats collapse to `main` , or `global` when scope is global).
2025-12-23 23:45:20 +00:00
- Runs the embedded Pi agent (configured via `agent` ).
2025-12-04 17:53:37 +00:00
- Thinking/verbose:
2025-12-17 11:29:12 +01:00
- Flags `--thinking <off|minimal|low|medium|high>` and `--verbose <on|off>` persist into the session store.
2025-12-04 17:53:37 +00:00
- Output:
2025-12-17 11:29:12 +01:00
- Default: prints text (and `MEDIA:<url>` lines) to stdout.
- `--json` : prints structured payloads + meta.
2026-01-02 01:19:22 +01:00
- Optional: `--deliver` sends the reply back to the selected provider (`whatsapp` , `telegram` , `discord` , `signal` , `imessage` ).