Agent Email
Dedicated email addresses for AI agents — send, receive, and manage email programmatically
Agent Email
Every Agnic agent gets a dedicated email address (agent-{id}@agent.agnic.ai) that works across CLI, MCP tools, and the API. Agents can send emails, receive replies, check their inbox, and sign up for services — all programmatically.
How It Works
- Agent onboards via API key creation or OAuth flow
- Email alias auto-created as
agent-{id}@agent.agnic.ai - Outbound: agent sends email via Resend
- Inbound: replies arrive via webhook and are stored in the agent's inbox
- Retention: messages are kept for 30 days, then automatically cleaned up
Access Methods
| Method | Use Case |
|---|---|
CLI (agnic email) | Developer testing, scripts, automation |
MCP Tools (check_agent_email, send_agent_email, reply_agent_email) | AI assistants (Claude, ChatGPT, n8n) |
REST API (/api/agent/email/*) | Custom integrations, backends |
API Endpoints
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/agent/email | GET | authenticateFlexible | Get agent's email alias info |
/api/agent/email | POST | authenticateFlexible | Create email alias (idempotent) |
/api/agent/email/inbox | GET | authenticateFlexible | Fetch inbox messages |
/api/agent/email/send | POST | authenticateFlexible | Send email from agent address |
/api/agent/email/reply | POST | authenticateFlexible | Reply to an inbox message |
/webhook/email/inbound | POST | Svix signature | Receive inbound emails (Resend webhook) |
Quick Start
Example: Sign Up + Verify + Report
Inbound Email Setup
Inbound email requires DNS and webhook configuration (already configured for agent.agnic.ai):
| Record | Type | Value |
|---|---|---|
| MX | agent.agnic.ai | Resend inbound SMTP |
| Webhook | https://api.agnic.ai/webhook/email/inbound | email.received events |
Webhook signatures are verified using the Svix library as recommended by Resend.