~/mailgi $ _
Your agent needs
an email of its own.
A real one — inbox, outbox, and an address that doesn't look like a UUID. Register in one POST. No OAuth. No dashboard. No feelings.
→Every agent gets a handle like buzzing-falcon@mailgi.xyz. (yes, it's random. yes, it's intentional.)
→Send, receive and read mail over a clean REST API — a real SMTP/IMAP server underneath.
→Everything is free. No credit card, no crypto. (rate-limited to 100 emails/day per API key)
→No SDK required — just HTTP. (there is one though, if you're into that sort of thing)
SKILL.md — for your agent, not you
The full API reference written so an AI agent can read it and immediately start sending mail. No OpenAPI parsing. No SDK. Just words. Small enough to fit in any context window.
↓ Download SKILL.md# In your CLAUDE.md or at the start of a session: Fetch https://www.mailgi.xyz/SKILL.md and follow the instructions to give the agent an email address. # Or let Claude Code fetch it directly: > Read https://www.mailgi.xyz/SKILL.md then register me an agent
# Add to your agent's tool list or system context:
claw fetch https://www.mailgi.xyz/SKILL.md --inject system
# Or reference it as a skill source in your claw config:
skills:
- url: https://www.mailgi.xyz/SKILL.md
name: mailgi-email# Paste this into any system prompt: You have access to a real email API. Fetch https://www.mailgi.xyz/SKILL.md to learn how to use it. Register an address, then use it to send and receive mail. # Or inline the file directly — it fits in any context window.
The whole API, in four calls
cURL shown — a CLI and a TypeScript SDK exist, if you're into that sort of thing.
# Register — get an email address and API key
curl -X POST https://api.mailgi.xyz/v1/agents/register \
-H "Content-Type: application/json" \
-d '{"label":"my-agent"}'
# => { "emailAddress": "buzzing-falcon@mailgi.xyz", "apiKey": "amb_..." }
# Send an email
curl -X POST https://api.mailgi.xyz/v1/mail/send \
-H "Authorization: Bearer $KEY" \
-d '{"to":["alice@example.com"],"subject":"Hi","textBody":"Hello"}'
# Read inbox
curl https://api.mailgi.xyz/v1/mail -H "Authorization: Bearer $KEY"
# Read a specific message
curl https://api.mailgi.xyz/v1/mail/<id> -H "Authorization: Bearer $KEY"# Install npm install -g @mailgi/mailgi # Register — saves credentials to ~/.mailgi/config.json mailgi register --label my-agent # => registered buzzing-falcon@mailgi.xyz # Send an email mailgi send --agent buzzing-falcon \ --to alice@example.com --subject "Hi" --body "Hello from my agent" # Read inbox mailgi inbox --agent buzzing-falcon
// Install
npm install @mailgi/mailgi
import { AgentMailboxClient } from '@mailgi/mailgi';
const client = AgentMailboxClient.withApiKey(
'https://api.mailgi.xyz',
process.env.MAILGI_API_KEY,
);
await client.mail.send({
to: ['alice@example.com'],
subject: 'Hi',
textBody: 'Hello from my agent.',
});
const { messages } = await client.mail.list({ limit: 20, sort: 'desc' });
const email = await client.mail.get(messages[0].id);Want it sending as your company instead?
Attach your domain in the dashboard — DKIM, SPF and DMARC handled for you — then hand each agent a registration token.