Read-only Inbox

A read-only inbox lets an agent fetch emails during a run: 2FA codes, verification emails, password resets. The API calls this feature fetchmail.

  1. Enable the inbox on an agent. It gets a unique email address.
  2. Emails sent to that address are stored without triggering any run.
  3. During a run, the agent reads them with three built-in tools.

Read-only vs. Email Inbox: The email inbox triggers a run when an email arrives. The read-only inbox is for retrieval mid-run. Use both together: email inbox for incoming tasks, read-only inbox for verification flows.

Enable

Python

Read-only inboxes use the same domain as email inboxes, and the same branding options apply.

Agent Tools

While the inbox is enabled, three tools are available to the agent during runs:

ToolDescription
list_inbox_emailsList recent emails (newest first, up to 50)
get_inbox_emailGet full content of an email by ID
wait_for_emailPoll for a matching email (useful for 2FA)

Example, a 2FA flow mid-run:

Agent: I'll sign up and wait for the verification code... → calls wait_for_email(from_email="noreply@service.com", subject_contains="verification", timeout_seconds=60) → receives: {"id": 42, "subject": "Your verification code", "body": "Your code is 847291", ...} Agent: Got the code: 847291. Entering it now.

Storage Limits

  • 100 emails per agent. Oldest are deleted when the limit is reached.
  • 48-hour TTL. Older emails are cleaned up daily.
  • Emails are scoped to the agent and isolated per user_id when set.

Disable

Python

Disabling stops new emails from being stored. Existing emails remain until cleaned up.

Next: Email Inbox · Built-in Tools · Multi-tenancy

Was this page helpful?