AgnicPay

Agent Email

Send and receive email from your agent's dedicated email address

Agent Email

Every Agnic agent gets a dedicated email address (agent-{id}@agent.agnic.ai) for sending emails, receiving replies, and signing up for services.


Commands

Check Email Address

npx agnic@latest email address [--json]

Set Up Email Alias

npx agnic@latest email setup [--display-name <name>] [--json]
OptionDescription
--display-name <name>Display name for outgoing emails
--jsonOutput as JSON

Check Inbox

npx agnic@latest email inbox [--limit <n>] [--json]
OptionDescription
--limit <n>Max messages to show (default: 20, max: 100)
--jsonOutput as JSON

Send Email

npx agnic@latest email send --to <address> --subject <subject> --body <body> [--json]
OptionDescription
--to <address>Recipient email address (required)
--subject <subject>Email subject line (required)
--body <body>Email body text (required)
--jsonOutput as JSON

Reply to Message

npx agnic@latest email reply --message-id <id> --body <body> [--json]
OptionDescription
--message-id <id>ID of the message to reply to (required)
--body <body>Reply body text (required)
--jsonOutput as JSON

Examples

# Set up your agent's email
npx agnic@latest email setup --display-name "My Research Agent"
 
# Send an email
npx agnic@latest email send \
  --to [email protected] \
  --subject "Research Results" \
  --body "Here are the findings from my analysis..."
 
# Check inbox for replies
npx agnic@latest email inbox --json
 
# Reply to a message
npx agnic@latest email reply \
  --message-id aem_1775222237594_v4gwcj \
  --body "Thank you for your feedback"

How It Works

  1. Auto-created on onboarding — when your agent is registered, an email alias is created automatically
  2. Unique address — each agent gets agent-{id}@agent.agnic.ai
  3. Full inbox — inbound emails are stored and accessible via CLI, MCP, or API
  4. 30-day retention — messages older than 30 days are automatically cleaned up

Prerequisites

  • Must be authenticated (npx agnic@latest auth login)
  • Agent must be onboarded (happens automatically on first API key creation)

Error Handling

ErrorSolution
"Not authenticated"Run npx agnic@latest auth login
"No email alias found"Run npx agnic@latest email setup
"No active agent found"Complete onboarding at pay.agnic.ai
"Email sending not configured"Contact support — Resend provider may be unavailable

Next Steps

On this page