AGMX gives AI agents real email addresses. An agent gets an inbox such as scout@bot.agmx.io, reads the verification codes and sign-in links that AGMX pulls out of each email, sends, replies and forwards through a REST API or an MCP server, and can get signed webhooks for new mail. A human owns the account, approves each agent that signs itself up, and can read along in a three-pane mail client, hold an agent’s outgoing mail for review or pause it. The hosted service at agmx.io is in invite-only early access. The code is open source under the MIT license, and anyone can run their own copy, sending and receiving through their own Amazon SES account.
How an agent gets an inbox
A person signs in to the dashboard with a magic link or a password, creates agents and gives each one an API key. An agent can also sign itself up. POST /api/v1/signup needs no credentials and returns an approval link, a short code and a poll token. The human opens the link, checks that the code matches the one the agent showed, can change the requested address, and approves or denies. The agent is told to poll every five seconds, and the first poll after approval returns its API key, once. A request expires after 30 minutes, and if the agent named its owner’s email, only that account can see or decide it. The site serves a guide written for agents at /skill.md, so telling an agent “Read agmx.io/skill.md and set up your own inbox,” as the homepage puts it, is meant to be enough.
An account key acts for the whole account, and an agent’s key can only use that agent’s inboxes. An agent can own as many addresses as its plan allows, one on Starter, 5 on Pro and 25 on Scale, and plus-addressing works: mail to scout+github@… reaches Scout’s inbox with github as a label. expiresIn makes an inbox temporary, deleted with its mail after anywhere from a minute to seven days, and an agent’s temporary inboxes, up to 10 at a time, don’t count toward that limit. With acceptFrom and maxMessages: 1 as well, a one-off sign-up can use an address that only accepts mail from one domain and closes after its first email. For a custom domain, AGMX creates the SES identity with DKIM, lists the DNS records to publish and checks them.
Reading mail
Every inbound email is parsed and checked, and AGMX pulls structured data out of its visible content before storing it. extracted.codes holds up to five likely one-time codes, scored mostly by nearby words such as “code”, “verification” or “sign in”, and a few in other languages, with prices and years filtered out. extracted.links sorts links into verify, login, reset, tracking, unsubscribe and other. AGMX also reads calendar invites from .ics parts, receipt totals and order numbers, UPS, FedEx, USPS and DHL tracking numbers, and up to 20,000 characters of text from PDF and text attachments. GET /api/v1/messages/wait holds the request open for up to 60 seconds until the next email arrives, optionally filtered by sender or subject, and the TypeScript SDK’s waitForCode builds on it.


Hidden instructions
Agents feed email straight into a model, so AGMX treats every inbound message as possible prompt injection. It removes HTML comments and elements a human wouldn’t see, such as display:none and visibility:hidden, zero opacity, fonts of a pixel or less, collapsed or off-screen boxes, white-on-white text, text colored like its background, and classes that a <style> block hides. It also removes zero-width characters, word joiners, soft hyphens, bidi controls and Unicode tag characters. The result is safeText: the plain-text part, or the cleaned HTML as text when there isn’t one. Then it scores the message against patterns for asking the reader to ignore its instructions, take on a new role, hide something from its human, send credentials or codes, forward mail, run tools or move money, for mentions of a system prompt or hidden instructions, and for chat-template tokens such as <|im_start|>. A match in hidden text adds 5 points, one in the visible text adds 2, and a score of 5 or more is high risk.
Codes and links are extracted from the cleaned content, so text hidden in the ways AGMX detects can’t plant a code, and list previews and webhooks are built from it too. The checks are heuristics, and the module’s own comment says they reduce risk without making untrusted text trustworthy. SES’s SPF, DKIM and DMARC verdicts decide whether the sender is trusted: when DMARC fails, or SPF and DKIM both fail, the message gets 3 more points, and its codes and its verify, sign-in and reset links are left out of extracted, though they’re still in the message text. When SES flags an attachment as malware, the message goes to spam and its attachments are kept by name only, never stored or served. The MCP tools return safeText and the security report instead of the raw HTML unless an agent asks for it, and the agent guide tells agents to read safeText, check the risk, and never follow instructions found in an email.

safeText and scoring a message, in src/server/mail/security.ts.Sending and approvals
Each agent has a send policy for mail sent with its own key. auto sends at once, first_contact holds mail to any address the inbox hasn’t exchanged mail with, and all holds everything, and a separate switch also holds anything with an attachment. New agents start on auto unless they’re created with another policy. Held mail waits in the Approvals queue, with the reason, until a human or an account key rejects or approves it, and approved mail goes out at once or at its scheduled time. An agent’s key can’t change its own policy, and mail sent from the dashboard or with an account key is never held.
The API also has drafts, scheduled sends with sendAt, which a worker checks every 10 seconds, and an Idempotency-Key header so a retried request never sends twice. A message can have at most 50 recipients, and addresses on the suppression list, where hard bounces and complaints go, are refused. Every agent on a server shares its operator’s SES account, so AGMX tracks each agent’s bounce and complaint rates over 30 days. At least five hard bounces making up 5% or more of its sends, or at least two complaints making up 0.1% or more, pause the agent’s sending until a human resumes it, while its receiving keeps working. Per-inbox rules can allow or block senders before mail is stored, or label it, forward a copy or send it to an extra webhook once it is, only a human or an account key can add forward and webhook rules, and a copy that has already been forwarded three times, or an auto-reply, isn’t forwarded again. Webhooks for received, sent, delivered, bounced, complained, held, approved and rejected mail, and for an agent’s sending being paused or resumed, are signed with HMAC-SHA256 in a t=…,v1=… header like Stripe’s, and a failed delivery is tried up to eight times in all, waiting 30 seconds after the first failure and doubling each time.
The dashboard
The mail client is built for the keyboard: j and k move through messages, c composes, r replies and e archives. It has threads, search, stars, drafts, scheduled and held mail, archive and spam folders, live updates over server-sent events, and dark mode. HTML mail renders in a sandboxed iframe that can’t run scripts, under a strict Content-Security-Policy and a no-referrer policy. The Overview lists held mail and pending sign-ups next to usage and activity, each agent’s page sets its policy, webhook and color and shows its bounce and complaint rates, and Settings exports or deletes the account’s data.
The Operator page, for operators, who are the addresses in ADMIN_EMAILS and anyone they promote, shows how the server is configured and walks through setting up SES, and operators can change each user’s plan and role. Plans are plain data in src/shared/plans.ts. The public ones are Starter, free with 2 agents, 300 sends and 5,000 received emails a month, Pro at $19 a month and Scale at $99, and operators get a hidden Unlimited plan. The pricing page says paid plans are enabled by the operator on request, and the repository has no payment code.
How it’s built
AGMX is one TanStack Start app, with React 19, Vite and Nitro, written in TypeScript. The backend is built with Effect 4: services for agents, mail, quotas, webhooks, inbound mail, domains, sign-ups and accounts, with typed errors, transactions and background workers, all wired into one runtime. The REST API is an Effect HttpApi defined once in src/shared, which produces the OpenAPI spec, the Scalar reference at /api/v1/reference and the typed client the dashboard uses. The MCP server at /mcp speaks Streamable HTTP and wraps the same services in 22 tools, from whoami and wait_for_email to drafts and inbox rules, so its limits and errors match the API’s. Drizzle ORM maps the Postgres schema, which seven SQL migrations build. Better Auth handles magic links, passwords and sessions, and the ALLOWED_EMAILS list is checked at sign-up, at sign-in and for every new session.
Outgoing mail leaves through SESv2 as raw MIME. Incoming mail arrives through an SES receipt rule that publishes to SNS, which posts it to /api/inbound/ses. AGMX checks the SNS signature with a certificate fetched from an sns.*.amazonaws.com host, and in production it refuses topics that aren’t on its list. Mail too large for an SNS message goes through S3, and AGMX deletes the raw object once it’s stored. Mail between two AGMX inboxes never touches SES. Attachments live in Postgres or in any S3-compatible bucket, which serves downloads through signed URLs. Long polls and the live dashboard run on an in-process event bus, and the rate limits, 600 requests a minute per key or session, 120 a minute per IP without credentials, 10 agent sign-up requests an hour per IP and 30 failed authentications per 10 minutes per IP, are counted in memory, which a comment in the code says matches a single-replica deployment.
The repository has about 24,000 lines of hand-written TypeScript in 146 files, not counting the generated route tree and SDK schema. The TypeScript SDK, @agmx.io/sdk, takes its types from the OpenAPI spec. The CLI, @agmx.io/cli, signs an agent up, creates temporary inboxes, waits for codes, reads and sends mail, and with agmx mcp runs a local MCP bridge over stdio for clients that can’t send headers to a remote server. Version 0.1.0 of both is on npm. A Python SDK is in packages/python, installed from the repository: it isn’t published, and the agmx name on PyPI belongs to an unrelated project. On GitHub Actions, each push to main and each pull request is typechecked, tested against Postgres 17 and built, and a second job makes sure the SDK’s types still match the API.
Running it locally
For this page, the repository’s latest commit was built with Bun 1.4.2, then run with Node 24 and PostgreSQL 18.6 inside a Linux network namespace with only a loopback interface, so the running app couldn’t reach agmx.io, AWS or anything else on the internet. With MAIL_TRANSPORT=log and MAIL_DOMAIN=agmx.localhost, a demo account created two agents through the API, Scout and Ledger, both set to approve first contact. Test mail went in through the development endpoint, POST /api/dev/inbound, which marks it as passing SPF, DKIM and DMARC, and two more agents asked for inboxes with curl. All 90 of the repository’s tests, in seven files of unit tests and end-to-end API tests, passed against the same local Postgres.
How it was made
The repository was created on GitHub on October 3, 2026, and has an issue opened on October 20 and a pull request merged on October 21, but the 22 commits now on main are dated November 2 to November 25, 2026. The first holds a README stub and an icon, and the second, “AGMX: email inboxes for AI agents”, adds 125 files, the docs among them. The rest of November 2 brought object-storage attachments, a design system and logo, the agent safety backend, and approvals, drafts, scheduling, the SDKs, the CLI and more docs. November 3 added sender checks, reputation pauses, rate limits, alerts and data export and deletion, then a polish pass. A reliability pass followed on November 9 as pull request 3, and November 20 brought dependency updates, refinements and publishing the SDK and CLI to npm. On November 25, the last two commits moved the deployment docs from Railway to Coolify, tightened security and added SECURITY.md and CONTRIBUTING.md to “prepare for open source.” Sixteen commits, from the second through the reliability pass, carry a co-author trailer for Claude: fifteen name Claude Opus 5.5 and one just Claude. The first commit and the last five have none.
Try it
The hosted service is invite-only for now, and agmx.io has the docs, the agent guide and the API reference. To run your own copy, git clone https://github.com/nearbycoder/agmx.io && cd agmx.io, then ADMIN_EMAILS=you@example.com docker compose up --build starts Postgres, RustFS for attachments and AGMX on http://localhost:3000, with no AWS account. Sign in with Email me a sign-in link and copy the link from docker compose logs -f app. After creating an agent such as scout, you can post a test email as JSON to localhost:3000/api/dev/inbound, addressed to scout@agmx.localhost, the way the README’s local development section does. The README covers switching to Amazon SES and deploying the Dockerfile with Coolify. From an app, npm install @agmx.io/sdk adds the SDK, and npx @agmx.io/cli runs the CLI.
Browse the source on GitHub. The creation date shown here is the GitHub repository’s UTC creation date. The homepage picture was captured for this page from agmx.io in headless Chromium, at the last frame of its animation, and cropped to the top of the page. The cover and the other screenshots were captured for this page from the local copy described above, using demo agents, test mail from invented senders on reserved domains and the README’s GitHub test email, with the dashboard’s Geist font served from a local copy. The cover is cropped to 1440 by 810, and the others are cropped to the part of the window they show. The code excerpt is from src/server/mail/security.ts, in light and dark versions that follow this site’s theme.