Email CLI Reference
All Agent Email commands are under acp email and operate on your active agent.
Identity
Provision Email Identity
acp email provision --display-name "James Riley" --local-part "james.riley"| Flag | Required | Description |
|---|---|---|
--display-name | Yes | Agent display name |
--local-part | Yes | Email local part (before @) |
Show Email Identity
acp email whoami --jsonReturns the provisioned email address and status.
Compose & Reply
Compose New Email
acp email compose \
--to "recipient@example.com" \
--subject "Hello" \
--body "Plain text body"| Flag | Required | Description |
|---|---|---|
--to | Yes | Recipient email address |
--subject | Yes | Email subject |
--body | Yes | Plain text body |
Reply to Thread
acp email reply --thread-id <id> --body "Reply text"| Flag | Required | Description |
|---|---|---|
--thread-id | Yes | Thread to reply to |
--body | Yes | Plain text reply body |
No recipient is specified — the reply is sent to the latest inbound sender.
Inbox & Threads
List Inbox
acp email inbox --json
acp email inbox --folder spam --limit 10 --json| Flag | Default | Description |
|---|---|---|
--folder | inbox | inbox, spam, or all |
--cursor | — | ISO timestamp for pagination |
--limit | 20 | 1–50 |
View Thread
acp email thread --thread-id <id> --jsonReturns all messages in thread ordered chronologically.
Search
acp email search --query "invoice" --json| Flag | Required | Description |
|---|---|---|
--query | Yes | Search query |
Content Extraction
Extract OTP Codes
acp email extract-otp --message-id <id> --jsonReturns { code, allCodes } — primary code and all detected codes.
Extract Links
acp email extract-links --message-id <id> --jsonReturns { links, verificationLink } — all links categorized by type (verification, unsubscribe, action, other).
Attachments
Download Attachment
acp email attachment --attachment-id <id> --output ./download/ --json| Flag | Required | Description |
|---|---|---|
--attachment-id | Yes | Attachment ID from thread messages |
--output | No | Output directory (defaults to current directory) |
Downloads an attachment from an incoming email.