# Test Inbox: Definition, Caps and Limits
URL: https://emailforagents.ai/docs/glossary/test-inbox
Summary: What a test inbox is, why a .mail.invalid address cannot resolve, the caps enforced in code, and the failure modes a simulated transport cannot show you.

## Test inbox

Tags: testing inboxes reliability

A test inbox is a mailbox on a generated, non-routable .mail.invalid address with a simulated transport, producing real events, approvals and error codes while being unable to reach any internet recipient.

Definition checked against the implementation on September 22, 2026.

You can unit-test an agent’s reasoning. You cannot unit-test what happens when a real
message lands in a real inbox, a model decides what to do with it, and a real
recipient gets the result. A test inbox is the environment in between, where
everything is real except the delivery.

### Why the address cannot resolve

A test inbox is issued on a generated address ending in `.mail.invalid`. The
`.invalid` top-level domain is reserved by RFC 6761 precisely so that it can never
resolve, which makes this a stronger guarantee than a flag that suppresses sending.
There is nowhere for the mail to go. If every guard in the application failed at
once, DNS still has no answer.

The environment is fixed at the project, not at the message. A project carries an
environment of `test` or `live`, chosen at creation, and attempting to change it
returns `environment_immutable`. There is no promotion path, so you keep two projects
and swap credentials, and the credential itself cannot cross: an `efa_test_` key
resolves only to test projects and test inboxes.

You also cannot customise a test address. Passing `local_part` or `domain_id` to a
test project returns HTTP 422 `test_mode_unsupported`, and test projects cannot
attach custom domains at all.

### The caps, which are enforced in code

| Limit | Value | Error when exceeded |
| --- | --- | --- |
| Test inboxes per workspace | 3 | HTTP 403 `test_limit_exceeded` |
| Sent test messages per workspace | 100 | HTTP 403 `test_limit_exceeded` |
| Test content per workspace | 10 MiB | HTTP 403 `test_limit_exceeded` |

The inbox and message counts never go down, and simulated incoming mail isn’t counted.

Three inboxes is enough for one agent under test, one for the counterparty role, and
one spare. Test mail is never counted as an email unit, so running the whole
receive-and-reply loop costs nothing, though every reply it sends counts toward the
100 sent test messages.

### What is real inside it

Everything except the transport. Inbound mail is injected through the project’s test
endpoint and produces genuine `message.received` events on the same event stream your
production code reads. Approvals are real approvals with real reason codes. Policy
denials return the same `policy_denied` and `recipient_not_allowed` errors as live
mail. Webhooks are real signed webhooks, which means your signature verification code
is exercised by the same implementation that will verify production callbacks.

That is the point of the arrangement: the three things that break in the first week
of an agent email integration are all integration bugs rather than model bugs. The
agent replies to an address lifted out of quoted text. Retry logic mints a fresh
idempotency key per HTTP attempt, so one timeout becomes two emails. A webhook
handler acts twice on a redelivered event. None of the three needs a real recipient
to reproduce, and all three are covered in
[testing an agent’s email without sending real mail](https://emailforagents.ai/guides/test-agent-email-without-sending).

### What it cannot tell you

Anything about deliverability. A simulated transport has no SPF, no DKIM alignment,
no reputation, no greylisting and no spam filter, so a message that works perfectly
here can still be filtered in production. Nothing observed in a test inbox is
evidence about inbox placement.

Anything about a real recipient’s client. Rendering, threading behaviour in a
specific mail app, and how a human reads a message are outside the boundary.

It is also worth being precise about what is distinctive here, because inbound
testing is not rare. Several email testing products provision a routable hosted
address and serve parsed inbound mail over an API, and at least one documents
originating a message itself to simulate a sender. The narrower difference is whose
mailbox the message lands in and whether it crosses a transport at all: this is a
non-routable address in the agent’s own inbox, with messages injected directly,
rather than a real transmission into a stand-in mailbox. Which of those you want
depends on whether you are testing the agent or testing your MTA configuration. The
CI-shaped version of the first is in
[running an inbound email loop in CI](https://emailforagents.ai/guides/test-inbound-email-loop-in-ci).

### Related terms

- [Agent email address: An agent email address is the mailbox identity an AI agent sends and receives from, issued on agents.emailforagents.ai for a live project and as a generated non-routable address for a test project.](https://emailforagents.ai/docs/glossary/agent-email-address)
- [Agent inbox: An agent inbox is an email address owned by an AI agent rather than a person, carrying its own thread history, its own permission grant, and a console where a human can hold outbound mail for review.](https://emailforagents.ai/docs/glossary/agent-inbox)
- [Email unit: An email unit is the usage unit for agent mail, counting one message received or one recipient sent to, so a single send addressed to three people consumes three units and test mail consumes none.](https://emailforagents.ai/docs/glossary/email-unit)

### Read further

- [Test an Agent's Email Without Sending Real Mail](https://emailforagents.ai/guides/test-agent-email-without-sending)
- [Test an Agent's Inbound Email Loop in CI](https://emailforagents.ai/guides/test-inbound-email-loop-in-ci)
- [Pricing](https://emailforagents.ai/pricing)
