Skip to main content

One post tagged with "pubsub"

View all tags

The Webhook Your Agent Sent That Another Team's Agent Received

· 10 min read
Tian Pan
Software Engineer

The first time two agents from different teams started talking to each other, nobody wrote a feature flag for it. The conversation just appeared in the logs. A support agent published an event called ticket.resolved to the shared bus. A growth agent, listening for ticket.resolved from a totally different product line, picked it up, congratulated the (wrong) customer in a follow-up email, and offered a discount on a product they did not own. By the time anyone noticed, the loop had run forty-three times.

The shared bus did exactly what shared buses do. It routed messages by topic name to anyone who subscribed. It did not know that one team meant ticket.resolved to refer to a payments support flow and the other team meant it to refer to a returns flow. It did not know that the second agent was authorized to act on the first agent's events. It did not, in fact, know that either side was an agent at all. The bus saw bytes labeled with a string and delivered them. The agents saw a message that matched their schema and acted.