{"name":"e2a: Open-Source Email API for Applications and AI Agents","description":"e2a is an open-source email API designed for applications and AI agents, offering robust transactional email capabilities and real two-way inboxes. It supports both managed hosting and self-hosting with Docker, providing features like human-in-the-loop approval and advanced content screening. Built in Go, e2a aims to bridge email's universal addressability with the structured data world of AI agents.","github":"https://github.com/tokencanopy/e2a","url":"https://osrepos.com/repo/tokencanopy-e2a","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/tokencanopy-e2a","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/tokencanopy-e2a.md","json":"https://osrepos.com/repo/tokencanopy-e2a.json","topics":["ai-agents","email-api","go","human-in-the-loop","smtp","email-automation","docker"],"keywords":["ai-agents","email-api","go","human-in-the-loop","smtp","email-automation","docker"],"stars":null,"summary":"e2a is an open-source email API designed for applications and AI agents, offering robust transactional email capabilities and real two-way inboxes. It supports both managed hosting and self-hosting with Docker, providing features like human-in-the-loop approval and advanced content screening. Built in Go, e2a aims to bridge email's universal addressability with the structured data world of AI agents.","content":"## Introduction\n\ne2a is an open-source email API for applications and AI agents, enabling transactional email sending and real two-way inboxes. Developed by [Token Canopy](https://tokencanopy.com), it allows agents to interact with email, incorporating human oversight when needed. Whether you're building a simple application or a complex AI agent, e2a provides the infrastructure to send and receive emails with structured data and enhanced security.\n\nThis project, written in Go, boasts a strong community with 191 stars and 25 forks, licensed under Apache-2.0. It's designed to be flexible, offering both a managed hosting service at [e2a.dev](https://e2a.dev) and the option to self-host using Docker.\n\n## Why Use e2a and Its Advantages\n\ne2a offers several compelling advantages over traditional email services, especially for AI agents and applications requiring advanced email interaction:\n\n*   **No Public URL Required for Inbound Mail**: Agents can authenticate with their API key and consume inbound mail over a WebSocket, by polling the REST API, or through MCP tools. This is ideal for agents on developer laptops, edge devices, or behind corporate firewalls, eliminating the need for public webhook URLs.\n*   **Email Threading on Every Reply**: e2a resolves the RFC `Message-ID`, `In-Reply-To`, and `References` graph within each agent mailbox, emitting correct reply headers and maintaining a server-owned topology identity for message reads. This ensures conversations remain coherent and easily trackable.\n*   **Slug Provisioning on a Shared Domain**: Operators can set `shared_domain` and users can immediately register an agent on a shared domain with no DNS configuration, simplifying onboarding.\n*   **Built-in Human-in-the-Loop (HITL) Review**: A per-agent protection policy can hold outbound mail in a `pending_review` state. Reviewers can approve via a dashboard, magic-link email, MCP tools, or the API, with configurable auto-expiration policies.\n*   **Inbound Content Screening**: Opt-in content scanning flags prompt-injection payloads, jailbreaks, obfuscation, data-exfiltration patterns, and even phishing attempts. Messages are routed to `allow`, `review`, or `block` based on scan sensitivity, providing a critical layer of security for AI agents.\n*   **Authenticated Inbound Identity**: Messages expose normalized SPF, DKIM, and DMARC evidence, with an explicit aligned DMARC verdict, ensuring the authenticity of incoming emails.\n\n## Installation\n\n### Self-host with Docker\n\nTo self-host e2a, you'll need Docker installed. Follow these steps:\n\n1.  Clone the repository:\n    bash\ngit clone https://github.com/tokencanopy/e2a.git\ncd e2a\n    \n2.  Start the Docker containers:\n    bash\ndocker compose up -d\n    \n    This will bring up Postgres, the API server, and the dashboard.\n3.  Verify health:\n    bash\ncurl http://localhost:8080/api/health\n    \n4.  Create your first user and API key:\n    bash\ndocker compose exec e2a e2a -config /etc/e2a/config.yaml -bootstrap-email you@example.com\n    \n    Save the API key, as it's shown only once.\n\n### Connect your agent to hosted e2a\n\ne2a provides quickstart guides for connecting various AI agent frameworks to its hosted service:\n\n*   **Claude Code**: `claude plugin marketplace add tokencanopy/e2a` then `claude plugin install e2a@e2a`\n*   **Codex**: `codex plugin marketplace add tokencanopy/e2a` then install `e2a` via `/plugins`\n*   **Cursor**: Add the MCP server directly to `.cursor/mcp.json`:\n    \n{\n  \"mcpServers\": {\n    \"e2a\": { \"url\": \"https://api.e2a.dev/mcp\" }\n  }\n}\n    \n\n## Examples\n\ne2a is highly versatile and can be used to build a wide range of AI-powered email applications. Here are some use cases:\n\n*   **AI Support Agent**: Triage customer requests, retrieve context, reply in-thread, and hold sensitive replies for approval.\n*   **AI Receptionist**: Answer common inquiries, route messages, and forward conversations to a human team.\n*   **AI Scheduling Agent**: Coordinate participants, propose times, and preserve state across multi-turn replies.\n*   **E-commerce Agent**: Handle order questions, returns, and coordinate with vendors through persistent email threads.\n\nFor complete, runnable examples, explore the [e2a-runbooks](https://github.com/tokencanopy/e2a-runbooks) repository, which demonstrates various use cases with different agent frameworks like Mastra, OpenAI Agents SDK, Claude Agent SDK, LangChain, CrewAI, and Pydantic AI.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/tokencanopy/e2a](https://github.com/tokencanopy/e2a \"e2a GitHub Repository\" target=\"_blank\")\n*   **Official Website**: [https://e2a.dev](https://e2a.dev \"e2a Official Website\" target=\"_blank\")\n*   **Documentation**: [docs/api.md](https://github.com/tokencanopy/e2a/blob/main/docs/api.md \"e2a API Documentation\" target=\"_blank\")\n*   **Python SDK**: [sdks/python/README.md](https://github.com/tokencanopy/e2a/blob/main/sdks/python/README.md \"e2a Python SDK\" target=\"_blank\")\n*   **TypeScript SDK**: [sdks/typescript/README.md](https://github.com/tokencanopy/e2a/blob/main/sdks/typescript/README.md \"e2a TypeScript SDK\" target=\"_blank\")","metrics":{"detailViews":1,"githubClicks":2},"dates":{"published":null,"modified":"2026-09-29T00:29:00.000Z"}}