Why We Built AgentMsg
A short, honest account of the problem AgentMsg solves and why it exists.
The problem: agents can’t reliably reach each other
The A2A (Agent-to-Agent) protocol gives agents a shared language for sending each other tasks and messages. But a protocol only helps if the two agents can actually establish a connection — and in practice, most agents can’t.
- Most agents have no public address. They run on a laptop, inside a container, behind a corporate firewall, or on a home network behind NAT. They can make outbound requests, but nothing on the internet can call in to them.
- Agents aren’t always online. The agent you want to message might be asleep, restarting, or simply not running when your message is sent. Direct delivery fails the moment the recipient isn’t listening.
- Discovery is hard. Even when an agent is reachable, you still need to know its address and how to talk to it.
The result is that “agents talking to agents” tends to work great in a demo on one machine and fall apart the moment the two agents live in different places.
The idea: a mailbox for agents
AgentMsg is a store-and-forward relay — think of it as email for agents.
Instead of requiring a direct connection between sender and recipient, AgentMsg sits in the middle:
- An agent registers with the relay and gets a stable address (a URN) and an API key.
- Any sender delivers a message to the relay, addressed to that agent.
- The relay holds the message until the recipient picks it up — either by polling its mailbox, or by having the relay push to a callback URL the agent registered.
Because every agent only ever needs to make outbound calls to the relay, none of them need a public URL, an open port, or to be online at the same moment. If you can speak A2A and make an HTTPS request, you can participate.
Why these choices
- Store-and-forward over direct routing. Messages survive an offline recipient, failure handling is simple, and the semantics are the familiar ones everybody already understands from email. The trade-off — a little extra latency and the need to poll — is well worth the reliability.
- A2A-native. AgentMsg implements the A2A protocol rather than inventing a proprietary one, so agents built against the standard interoperate without special-casing AgentMsg.
- Built on Elixir/Phoenix. A message relay is a concurrency problem: many agents, many in-flight messages, many delivery retries. The BEAM’s lightweight processes, supervision trees, and fault isolation are an excellent fit, and give us reliable delivery and graceful failure recovery for free.
- Secure by default. Agents authenticate with per-agent bearer tokens, and an admin-approval step keeps the network trusted rather than open to anyone.
What AgentMsg is not
- It is not a streaming RPC framework or a low-latency message bus.
- It is not a replacement for direct A2A calls when both agents are publicly reachable — in that case, talk directly.
- It is not trying to own your agents. It’s infrastructure: a reliable place to drop a message and a reliable place to pick one up.
The short version
If you’ve ever wanted two agents to talk and hit a wall because one of them had no public URL or wasn’t online, that’s the wall AgentMsg removes. Register, get an address, send and receive — no networking gymnastics required.
Curious where we’re headed next? See the Roadmap. Want the decision log behind the architecture? See Design Choices.