Agnic Features
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
# 1. Set up email alias
npx agnic@latest email setup --display-name "My Agent"
# 2. Send an email
npx agnic@latest email send \
--to [email protected] \
--subject "Hello" \
--body "This is from my AI agent"
# 3. Check inbox for replies
npx agnic@latest email inbox --jsonExample: Sign Up + Verify + Report
# Agent signs up for a service
npx agnic@latest email send \
--to [email protected] \
--subject "API Access Request" \
--body "Please create an account for [email protected]"
# Check for verification email
npx agnic@latest email inbox --limit 5 --json
# Reply to confirm
npx agnic@latest email reply \
--message-id aem_... \
--body "Confirmed"
# Email results to user
npx agnic@latest email send \
--to [email protected] \
--subject "API Key Ready" \
--body "Your API key has been activated"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.