Skip to content
  • api
  • sdk
  • cli
  • mcp

Give your agent its own mailbox to read and reply

Create an email address for an agent or app on samva.email or your own domain, with threads, replies, drafts, approval before sending, and quarantine.

An agent or app can now own an email address. It reads threads, replies, forwards and keeps drafts, and it acts as itself through a key that reaches only its own mailbox.

Create the address on your organization's samva.email subdomain with no DNS setup, or on a domain you have verified. People you grant access to the mailbox share it in webmail at /mail.

What you can do

  • Approve before it sends. Set a key's send mode to approval and a person approves or denies each outgoing message first.
  • Hold suspicious mail. Inbound mail that looks risky waits in quarantine until a person releases or discards it.
  • React to mail. Subscribe a webhook to mailbox.* events, or read them from samva.mailboxes.events, which reconnects on its own and resumes from the cursor you saved.
  • Run code on events. Build extensions with @samva/mailbox and manage them with samva extensions.
for await (const event of samva.mailboxes.events({ cursor: await loadCursor() })) {
  await handle(event);
  await saveCursor(event.cursor);
}

Start with Give an agent an inbox. The mailbox agent example is a runnable project, and Mailboxes shows the product.