e2a: Open-Source Email API for Applications and AI Agents
This repository profile is provided by osrepos.com, an open source repository discovery platform.

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.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
e2a is an open-source email API for applications and AI agents, enabling transactional email sending and real two-way inboxes. Developed by Token Canopy, 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.
This 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 and the option to self-host using Docker.
Why Use e2a and Its Advantages
e2a offers several compelling advantages over traditional email services, especially for AI agents and applications requiring advanced email interaction:
-
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.
-
Email Threading on Every Reply: e2a resolves the RFC
Message-ID,In-Reply-To, andReferencesgraph 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. -
Slug Provisioning on a Shared Domain: Operators can set
shared_domainand users can immediately register an agent on a shared domain with no DNS configuration, simplifying onboarding. -
Built-in Human-in-the-Loop (HITL) Review: A per-agent protection policy can hold outbound mail in a
pending_reviewstate. Reviewers can approve via a dashboard, magic-link email, MCP tools, or the API, with configurable auto-expiration policies. -
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, orblockbased on scan sensitivity, providing a critical layer of security for AI agents. -
Authenticated Inbound Identity: Messages expose normalized SPF, DKIM, and DMARC evidence, with an explicit aligned DMARC verdict, ensuring the authenticity of incoming emails.
Installation
Self-host with Docker
To self-host e2a, you'll need Docker installed. Follow these steps:
git clone https://github.com/tokencanopy/e2a.git
cd e2a
docker compose up -d
This will bring up Postgres, the API server, and the dashboard.
curl http://localhost:8080/api/health
docker compose exec e2a e2a -config /etc/e2a/config.yaml -bootstrap-email you@example.com
Save the API key, as it's shown only once.
Connect your agent to hosted e2a
e2a provides quickstart guides for connecting various AI agent frameworks to its hosted service:
-
Claude Code:
claude plugin marketplace add tokencanopy/e2athenclaude plugin install e2a@e2a -
Codex:
codex plugin marketplace add tokencanopy/e2athen installe2avia/plugins -
Cursor: Add the MCP server directly to
.cursor/mcp.json:{ "mcpServers": { "e2a": { "url": "https://api.e2a.dev/mcp" } } }
Examples
e2a is highly versatile and can be used to build a wide range of AI-powered email applications. Here are some use cases:
-
AI Support Agent: Triage customer requests, retrieve context, reply in-thread, and hold sensitive replies for approval.
-
AI Receptionist: Answer common inquiries, route messages, and forward conversations to a human team.
-
AI Scheduling Agent: Coordinate participants, propose times, and preserve state across multi-turn replies.
-
E-commerce Agent: Handle order questions, returns, and coordinate with vendors through persistent email threads.
For complete, runnable examples, explore the 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.
Links
-
GitHub Repository: https://github.com/tokencanopy/e2a
-
Official Website: https://e2a.dev
-
Documentation: docs/api.md
-
Python SDK: sdks/python/README.md
-
TypeScript SDK: sdks/typescript/README.md
Related repositories
Similar repositories that may be relevant next.

Vicoa: Agentic IDE for Orchestrating Coding Agents Across Devices
September 29, 2026
Vicoa is an open-source, self-hostable agentic IDE designed to orchestrate a team of coding agents. It enables developers to run and steer multiple AI agents from various devices, including desktop, mobile, and remote servers, providing a unified command center for development workflows.

CCCC: Coordinate Your Coding Agents Like a Group Chat
September 29, 2026
CCCC is a production-minded orchestrator designed to coordinate coding agents like a group chat, offering features such as read receipts, delivery tracking, and remote operations from your phone. It enables 24/7 workflow for multi-agent teams with a single `pip install` and zero infrastructure. This tool helps manage diverse AI runtimes, ensuring persistent collaboration across different machines and trusted working groups.

Spec Kitty: Spec-Driven Development for AI Coding Agents and Software Factories
September 27, 2026
Spec Kitty is an open-source CLI that enables spec-driven development for AI coding agents and multi-agent workflows. It transforms product intent into a structured, repo-native AI coding workflow, providing isolated git worktrees and a clear lifecycle for development tasks. This tool helps teams build governed software factories, ensuring visibility and traceability in AI-assisted software development.

text-to-cad: AI Agent Skills for CAD, CAE, and CAM Workflows
September 24, 2026
text-to-cad is a comprehensive Python library developed by earthtojake, providing a rich set of agent skills for Computer-Aided Design (CAD), Computer-Aided Engineering (CAE), and Computer-Aided Manufacturing (CAM). It enables AI agents to generate, inspect, source, slice, and manage CAD and robot-description artifacts, streamlining complex engineering processes.
Source repository
Open the original repository on GitHub.