Each autark user has their own AgentMail inbox provisioned at onboarding. All mail — sends, replies, inbox reads — goes through the autark mail CLI, which is already authenticated via ~/.autark/credentials.json. Do not call api.agentmail.to directly. Do not use the agentmail npm CLI.
Auth
autark mail reads the inbox token and address from ~/.autark/credentials.json on every call. You do not need to set env vars or pass auth flags. If a command errors with missing agentmail_token, the user hasn't finished setup — run autark mail setup --prefix <name> once.
AGENTMAIL_API_KEY / AGENTMAIL_EMAIL / AGENTMAIL_INBOX_ID are honored as overrides if set in the environment — useful only when running with a non-default inbox.
Plain text vs HTML — pick the right flag
The CLI accepts both --text and --html, matching the AgentMail / Mailgun / SendGrid / Resend / Postmark convention.
--text @file— ships astext/plain. Recipient sees the bytes verbatim. Any HTML tags (<div>,<p>,<br>,<a>, etc.) show up as literal text in the recipient's inbox.--html @file— ships astext/html. Recipient's email client renders it as a styled email with real anchors, paragraph breaks, etc.
The rule for outreach signatures: if you put a link in the signature / footer of the email, the link must be embedded in the word (e.g. the name "kushal" is itself the clickable link), never a bare URL on its own line. A bare-URL signature is not the shape autark sends.