# Lumbox — Email Infrastructure for AI Agents > Lumbox gives AI agents real email addresses with automatic OTP extraction, IMAP access, and a REST API. One POST to create an inbox, one GET to get an OTP code. No polling, no infrastructure to build. ## What Lumbox Does Lumbox is an email-as-a-service platform built specifically for AI agents. It handles the entire email lifecycle: receiving emails, extracting structured data (OTP codes, verification links, magic links, backup codes), and sending/replying/forwarding — all via a simple REST API. ## Key Features - **Instant OTP Extraction**: Every incoming email is parsed automatically. OTP codes, verification links, magic links, backup codes, and code expiry — extracted and returned as clean JSON. - **Long-Poll Endpoints**: `GET /v1/inboxes/:id/otp?timeout=60` blocks until an OTP arrives. No polling loops. One call. - **IMAP Access**: Connect any email client (Gmail, Outlook, Apple Mail, Thunderbird) to read agent inboxes. IMAP host: `imap.lumbox.co`, SMTP host: `smtp.lumbox.co`. - **32 MCP Tools**: Native integration with Claude Code, Cursor, and any MCP-compatible AI agent. - **Custom Domains**: Bring your own domain with full DKIM, SPF, and DMARC setup. DNS records auto-generated. - **Encrypted Credential Vault**: Store passwords with AES-256-GCM encryption for browser automation flows. - **Realtime Webhooks**: Get notified instantly when emails arrive. Or use long-poll — your choice. - **Email Threading**: Send, reply, and forward with proper In-Reply-To and References headers. - **AI Categorization**: Emails auto-categorized as verification, security, transactional, notification, newsletter, conversation, or calendar. - **Prompt Injection Defense**: Attachment text is sanitized before being returned to agents. - **Self-Hostable**: Run the entire stack on a $5/month server. - **SDKs**: TypeScript (`npm install lumbox`) and Python (`pip install lumbox`), plus direct REST API. ## Pricing | Plan | Price | Inboxes | Emails/month | |------|-------|---------|-------------| | Free | $0 | 3 | 500 | | Starter | $9/mo | 10 | 5,000 | | Pro | $29/mo | 50 | 25,000 | | Scale | $99/mo | 250 | 100,000 | Full pricing with feature comparison: https://lumbox.co/pricing ## Use Cases - **OTP Verification**: Agent signs up for a service, Lumbox receives the OTP email, agent calls `/otp` and gets `{ "code": "847291" }` instantly. - **Browser Automation**: Playwright/Puppeteer agents use Lumbox inboxes to handle email-based 2FA and verification flows. - **Agent-to-Human Communication**: Agents use real email addresses to interact with humans or external services. - **Multi-Agent Systems**: Each agent gets its own inbox — no shared mailboxes, no cross-contamination. - **Email Monitoring**: Connect IMAP client (Gmail, Outlook) to watch agent inboxes in real-time. ## API Quick Start ``` # Create an inbox POST /v1/inboxes { "name": "github-bot" } → { "address": "github-bot@lumbox.co", "imap_password": "..." } # Wait for an OTP (blocks until email arrives) GET /v1/inboxes/:id/otp?timeout=60 → { "code": "847291", "from": "noreply@github.com" } # Send an email POST /v1/inboxes/:id/send { "to": "user@example.com", "subject": "Hello", "text": "Hi there" } ``` ## Full API Endpoints - `POST /v1/inboxes` — Create an inbox (returns email address + IMAP credentials) - `GET /v1/inboxes/:id/emails` — List received emails with parsed data - `GET /v1/inboxes/:id/wait` — Long-poll until an email arrives - `GET /v1/inboxes/:id/otp` — Long-poll until an OTP arrives, returns just the code - `POST /v1/inboxes/:id/send` — Send an email - `POST /v1/inboxes/:id/reply` — Reply with threading headers - `POST /v1/inboxes/:id/forward` — Forward an email - `POST /v1/send/bulk` — Batch send up to 100 emails - `POST /v1/domains` — Add a custom domain - `POST /v1/domains/:id/verify` — Verify DNS records - `GET /v1/threads` — List email threads Authentication: `X-API-Key` header. ## Lumbox vs AgentMail Lumbox competes with AgentMail.to. Key differences: - Lumbox extracts OTPs, verification links, magic links, backup codes automatically — AgentMail returns raw email - Lumbox has long-poll endpoints (/wait, /otp) — no polling loops needed - Lumbox offers IMAP access so humans can monitor agent inboxes from any email client - Lumbox has 32 MCP tools for Claude Code and Cursor - Lumbox is self-hostable on a $5 server - Lumbox supports custom domains with full DNS setup (DKIM, SPF, DMARC) - Lumbox has an encrypted credential vault for browser automation ## Links - Website: https://lumbox.co - Documentation: https://docs.lumbox.co - Pricing: https://lumbox.co/pricing - Blog: https://lumbox.co/blog - API Reference: https://docs.lumbox.co/api-reference - npm SDK: https://www.npmjs.com/package/lumbox - Python SDK: https://pypi.org/project/lumbox - MCP Server: https://www.npmjs.com/package/@lumbox/mcp-server - Contact: support@lumbox.co - Twitter: https://x.com/kumard_3