DEV Community

Volanea
Volanea

Posted on

Stable addresses for agents: the boring part that decides reliability

An agent that owns an email address needs that address to be stable across deploys. The tempting shortcut is a single shared mailbox with a label per agent, and it works right up until the label is lost in a migration.

Address as identity

If the address is the identity, then routing, authorisation and audit all key off a string that rarely changes. support+agent-7@example.com is not that string: plus addressing is stripped by plenty of systems, and a provider that normalises it will collapse two agents into one inbox.

A dedicated address per agent, agent-7@agents.example.com, survives normalisation because it is an ordinary local part. Decommissioning an agent is deleting a mailbox, which is a much smaller operation than surgically removing a label from a shared one.

The failure mode people forget

Agents retry. If the same inbound message is delivered to the agent twice because the worker crashed between processing and acknowledging, the customer gets two replies. The acknowledgement has to be a server-side fact tied to the message id, not a local variable that disappears with the process.

What to build first

Create, list and delete mailboxes through an API. Thread state per mailbox, not per agent process. A deadline on every reply so a stuck agent cannot hold a conversation open forever.

Volanea gives each agent a real address with server-side read state and threading, which turns agent identity into an API call instead of a convention.

Top comments (0)