Sandbox
@agentteamhq/agentteam-email

Email infrastructure for AI agents and CLIs

AgentTeam Email is a mail system you run yourself for agents and people. It combines mailbox management, a web email client, Cloudflare-based mail routing, and a portable `at-email` CLI for checking status, searching mail, and sending approved replies. It also ships with deployment paths for Docker Compose and Helm, plus a skill package for agent workflows. That makes it useful when you want agents to work inside real mailboxes instead of your personal inbox.

60 stars2 forksTypeScriptUpdated 1mo ago
Who it's for

Builders who want Claude Code, Codex, or other agents to work with real mailboxes and approved outbound email.

What it delivers

You can give agents their own inboxes and control what they read, draft, and send.

What it does

Agent mailboxes

Creates separate mailboxes for people and agents, with routing, groups, and permissions from one admin surface.

Web email client

Provides a full email UI for reviewing messages and handling everyday mail workflows.

Safe message review

Opens untrusted mail in a dedicated surface so agents can inspect it more carefully.

Cloudflare mail flow

Supports inbound and outbound mail through Cloudflare and connected domains, with R2 used in the receive path.

Portable CLI

Ships `at-email` commands for mailbox status, message review, search, and approved sending.

Agent skill

Includes a packaged skill in `skills/at-email-cli` for operating authorized mailboxes from an agent.

Self-hosted deployment

Supports local and cluster installs with Docker Compose and a Helm chart.

How to get it

  1. 1Check local availability
    command -v at-email
    at-email --version
  2. 2One-off npm usage
    npx --yes @agentteamhq/email@latest --version
  3. 3Agent setup paths
    at-email agent connect
    at-email agent trial
    at-email agent enroll TOKEN
  4. 4Install repo-managed tools from the repository root
    mise install
    pnpm install

README

AgentTeam Email

AgentTeam Email product preview

Open-source email infrastructure for AI agents. Give every agent a dedicated mailbox, review untrusted mail safely, and send outbound mail from connected domains.

Website · App · Docs · Quickstart · Self-hosting · Storybook

MIT license Documentation Build, Test and Deploy workflow Storybook Helm OCI chart

Core Capabilities

  • Create mailboxes for people and agents, then control routing, groups, and permissions from one admin surface.
  • Full web email client for everyday work mail, startup team inboxes, and agent-operated accounts.
  • Seamless Cloudflare integration for sending and receiving through your domain.
  • Safe message review for agents, with untrusted mail opened in a dedicated product surface.
  • Self-hosted deployment with Docker Compose or Helm.
  • A portable at-email CLI and agent skill for operating authorized mailboxes.

Why It Matters

  • Give agents real inboxes without handing them your inbox: agents can read, draft, and send through scoped mailbox access instead of broad personal account access.
  • Start self-hosted and keep ownership: run it yourself, adapt it to your workflow, and contribute changes back under a permissive license.

Use Cases

  • Shared inbox triage: route support, hiring, press, keyword alerts, and partner mail to agents that can summarize, classify, and surface what needs attention.
  • Human-reviewed sending: let agents draft replies or outbound mail while people approve, edit, or restrict what actually gets sent.
  • Agent-owned operations: give long-running agents their own addresses for vendor accounts, research workflows, outreach, and follow-up.

How It Works

AgentTeam Email is built for operators running mail for AI agents.

  • Agent mailboxes: each agent gets a real mailbox for receiving, reviewing, and sending mail.
  • Operator-first self-hosting: run the web app and mail services on your own infrastructure.
  • Bucket-first receive path: inbound mail lands in R2 before AgentTeam Email processes it, so backlog or downtime affects processing instead of initial receipt.
%%{init: {"flowchart": {"curve": "basis"}}}%%
flowchart TB
  mail["Inbound mail<br/><small>(Cloudflare)</small>"] --> bucket[(R2 bucket)]
  bucket --> app[AgentTeam Email]
  app --> bucket

For deeper detail, see ARCHITECTURE.md and Mail Flow.

Get Started

Start with the Quickstart to go from install to your first connected domain and mailbox.

Useful setup docs:

Self-Hosting

AgentTeam Email can run on one host with Docker Compose or on Kubernetes with Helm. The self-hosting docs cover environment setup, Cloudflare connection, R2 storage, ingress, and post-install checks.

CLI And Agent Skill

The at-email CLI lets agents and operators check mailbox status, review messages, search mail, and send approved outbound email.

Check local availability:

command -v at-email
at-email --version

One-off npm usage:

npx --yes @agentteamhq/email@latest --version

Agent setup paths:

at-email agent connect
at-email agent trial
at-email agent enroll TOKEN

The bundled agent skill lives in skills/at-email-cli. Read the CLI and agent skill docs for the full workflow.

Development

Install repo-managed tools from the repository root:

mise install
pnpm install

For the full local development workflow, read SETUP.md.

Repository Layout

  • apps/web-server: deployable web app and Node server.
  • apps/mail-control-service: mail runtime coordination service.
  • apps/at-email-cli: portable CLI distribution.
  • packages/frontend: authenticated product UI and Storybook surface.
  • packages/backend: backend APIs and integration logic.
  • packages/cloudflare-email-worker: Cloudflare Email Routing Worker source.
  • charts/agentteam-email: Helm chart for Kubernetes installs.
  • docs: Mintlify documentation source.
  • skills/at-email-cli: agent skill source for CLI mailbox operation.

Security

Please report vulnerabilities through GitHub Security Advisories, not public issues. See SECURITY.md for the private reporting path and security-sensitive contribution rules.

Contributing

See CONTRIBUTING.md for local setup, validation, pull request guidance, and public issue expectations. Keep public issues and pull requests free of secrets, credentials, tokens, private hostnames, and private operational details.

License

MIT. See LICENSE.

Files in the repo

Repository payload45 top-level entries
  • .github
  • .vscode
  • apps
  • charts
  • docs
  • packages
  • scripts
  • skills
  • tasks
  • test-containers
  • .containerignore
  • .dockerignore
  • .env.example
  • .gitignore
  • .gitleaks.toml
  • .oxfmtrc.jsonc
  • .oxlintrc.jsonc
  • .pnpmfile.cjs
  • .prettierignore
  • AGENTS.md
  • api-extractor.base.json
  • ARCHITECTURE.md
  • CLAUDE.md
  • components.json
  • compose.build.yaml
  • compose.dev.yaml
  • compose.yaml
  • CONTRIBUTING.md
  • eslint.config.mjs
  • LICENSE
  • mise.toml
  • package.json
  • PEER-DEPS.md
  • pnpm-lock.yaml
  • pnpm-workspace.yaml
  • prettier.config.cjs
  • README.md
  • RELEASE.md
  • renovate.json
  • SECURITY.md
  • SETUP.md
  • skills.sh.json
  • tsconfig.base.json
  • tsconfig.json
  • turbo.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k
virgiliojr94/
book-to-skill

Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work.

30k
herdrdev/
herdr

the runtime your coding agents live on

37k