npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

agent-mailbox-cli

v0.1.4

Published

Email addresses for AI agents. Zero cost per account.

Readme

AgentMailbox

Email addresses for AI agents. Zero cost per account.

AgentMailbox gives any AI agent its own email address at @agentmailbox.io. Agents can receive verification codes, order confirmations, and notifications — no Gmail or Google Workspace fees per account.

Install

npm install -g agent-mailbox-cli

Quick Start

# 1. Sign up for an admin account
agentmailbox signup [email protected]
# → sends a 6-digit code to your email
# → paste code to log in

# 2. Create an org to get an API key
agentmailbox org create my-org
# → API Key: ae_xxxxx

# 3. Create an email account for your agent
export AGENT_EMAIL_API_KEY=ae_xxxxx
agentmailbox account create grocery-bot
# → [email protected]

# 4. Read emails
agentmailbox msg list [email protected]

# 5. Wait for a new email (blocks until one arrives)
agentmailbox msg wait [email protected] --timeout 60

# 6. Read a specific message
agentmailbox msg read [email protected] <message-id>

# 7. Reply
agentmailbox msg reply [email protected] <message-id> "Got it, thanks"

CLI Commands

Auth

agentmailbox signup <email>       # Create admin account (magic link)
agentmailbox login <email>        # Log in (magic link)
agentmailbox logout               # Log out
agentmailbox whoami               # Show current user

Orgs (requires login)

agentmailbox org create <name>    # Create org, get API key
agentmailbox org list             # List your orgs
agentmailbox org rotate-key <id>  # Rotate API key

Accounts (requires API key)

agentmailbox account create <name>           # Create email account
agentmailbox account list                    # List accounts
agentmailbox account delete <address>        # Delete account

Messages (requires API key)

agentmailbox msg list <address>                          # List inbox
agentmailbox msg read <address> <id>                     # Read message
agentmailbox msg wait <address> --timeout 60             # Wait for new email
agentmailbox msg reply <address> <id> "reply text"       # Reply
agentmailbox msg send <from> <to> "Subject" "Body"       # Send new email

API

Base URL: https://agent-email-api-production.up.railway.app

Authentication

Two types of auth:

  • Admin session (as_ token): for org management. Obtained via magic link login.
  • Org API key (ae_ token): for account/message operations. Obtained when creating an org.

Both use Authorization: Bearer <token> header.

Auth Endpoints

POST /v1/auth/signup    { email }              Create admin account, send code
POST /v1/auth/login     { email }              Send login code
POST /v1/auth/verify    { token }              Verify code, get session token
POST /v1/auth/logout                           End session
GET  /v1/auth/me                               Current user info

Org Endpoints (admin session required)

POST /v1/orgs                    { name }      Create org, get API key
GET  /v1/orgs                                  List your orgs
POST /v1/orgs/:id/rotate-key                   Rotate API key

Account Endpoints (API key required)

POST   /v1/accounts              { local_part, display_name? }   Create email account
GET    /v1/accounts                                              List accounts
DELETE /v1/accounts/:address                                     Delete account

Message Endpoints (API key required)

GET    /v1/accounts/:address/messages?limit=50&since=ISO8601     List inbox
GET    /v1/accounts/:address/messages/:id                        Read message
GET    /v1/accounts/:address/messages/wait?timeout=30            Wait for new email
POST   /v1/accounts/:address/messages/:id/reply  { text, html? }  Reply
POST   /v1/accounts/:address/send  { to, subject, text, html? }   Send new email
DELETE /v1/accounts/:address/messages/:id                        Delete message
GET    /health                                                   Health check

Example: Agent Signup Flow

const API = 'https://agent-email-api-production.up.railway.app';
const KEY = 'ae_xxxxx';

// 1. Create an email for the agent
const { account } = await fetch(`${API}/v1/accounts`, {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ local_part: 'bot-123' })
}).then(r => r.json());
// → [email protected]

// 2. Sign up for a service using that email
// ... (agent signs up on grocery site with [email protected])

// 3. Wait for verification email
const { message } = await fetch(
  `${API}/v1/accounts/[email protected]/messages/wait?timeout=60`,
  { headers: { 'Authorization': `Bearer ${KEY}` } }
).then(r => r.json());

// 4. Extract verification code
const code = message.text.match(/\d{6}/)?.[0];

Architecture

Internet ──SMTP:25──▶ Fly.io (SMTP receiver) ──▶ PostgreSQL (Railway)
                             ▲                         ▲
                             │ HTTPS (send API)        │
Agents ──HTTPS──▶ Railway (REST API) ─────────────────┘
  • API: Fastify on Railway
  • SMTP: Node.js smtp-server on Fly.io, port 25 + HTTP send API
  • Database: PostgreSQL on Railway
  • Domain: agentmailbox.io (Vercel DNS, MX + SPF + DMARC configured)

Development

# Start Postgres
docker compose up -d

# Init database
npm run db:init

# Run everything locally
npm run dev

# Or run API and SMTP separately
npm run dev:api
npm run dev:smtp

Deploy

# API → Railway
railway up -s agent-email-api

# SMTP → Fly.io
fly deploy --app agent-email-smtp