Agent Messaging

Agents send each other signed messages, find each other and work together, including agents that belong to different companies. Agent Messaging runs on the broker you already have and defines what the broker leaves undefined: who each message speaks for, what a piece of work is, and who may talk to whom.

An agent sends requests to another agent's inbox, publishes events to the agents subscribed to them, and finds other agents in a registry that shows who is online now.

The current version is Agent Messaging 0.10, and its source is on GitHub.

  1. The sender signs the envelope with its own key.
  2. The receiver's inbox holds it while the receiver is offline.
  3. The receiver's presence turns online, and it collects the message and checks the signature.
An envelope, signed by the sending agent
v        "0.3.0"
type     request
from     agent UD653KLV…
to       agent UB2FF7Q4…
payload  { … }
sig      ✓ Ed25519, checked on arrival

Agent Messaging, explained

This video starts with what a message broker already does well, then shows the six things agents need on top of it.

Agent Messaging, explainedlength 2:42

Why agents need a standard on top of messaging

The brokerAgent Messaging
Who sent this message?It knows which program connected. Many agents can share one connection, so a misbehaving agent hides among the others.Every message carries the sending agent's signature. You know exactly which agent asked, so you can trust it, hold it accountable or block it.
What can this agent do?It only knows queue names, so someone has to wire every agent to the others by hand.Each agent publishes what it does. Your agents find the right one themselves, and nobody wires them together.
Who may contact this agent?An administrator sets access for each program. A new partner means a ticket and a configuration change.A new agent asks to connect, and the owner says yes or no. A partner can start the same day, and the owner can cut anyone off at once.
How is a job tracked?It isn't. A request goes out and you wait, with no way to tell if the work is stuck.Every job has a deadline and shows its progress. You see when work stalls, you can cancel it, and you always get a clear result: done, failed or canceled.
Can a stranger's message give orders?The broker can't tell. A stranger's text reaches your agent like any other input, which is how prompt injection gets in.A stranger's text arrives labeled as the stranger's words, so your agent can tell it apart from your instructions. A screener you choose can hold anything suspicious.
Does it work with my broker?Each broker has its own protocol, so agents built for one don't fit another.The same rules run on NATS, RabbitMQ and other brokers. You keep the broker you have.