Skip to content
Go back

Agents, Routing, Patterns, and Actors

Published:  at  11:00 AM

Building Agent Networks that Don’t Collapse Under Their Own Cleverness

TL;DR

• Once you get past the hello-world demos, agents don't just need tools—they need infrastructure.

• And that means message routing, protocol contracts, and actors that know when to get off the stage.

Message Routing is Not Optional

Let’s say your agent asks another agent to “book a trip.” Simple, right? But now you’ve got one of three subflows:

Which service (or agent) handles that message? That’s message routing and if you don’t define the logic, you’ll end up reimplementing it ad-hoc in every agent’s brain.

This is exactly the problem that Enterprise Integration Patterns (EIP) solved decades ago. Back then it was about backend systems; today it’s agents. The core idea holds:

Messages should go to the right place, at the right time, and in the right format.

Classic Patterns Still Apply

Gregor Hohpe’s canonical patterns are a perfect fit for agent systems:

PatternAgent World Analogy
Content-Based RouterPlannerAgent chooses Translate vs Refund
Dynamic RouterClassifierAgent hands to domain-specific tool
AggregatorSummariseAgent compiles subtasks
Scatter-GatherSearchAgent fans out to Web, API, Memory
Message FilterValidationAgent drops irrelevant inputs

These map directly onto the coordination challenges in multi-agent setups.

If your planner agent always knows which sub-agent to call, fine.

But as soon as your logic becomes dynamic, you either reimplement these patterns—or you use the infrastructure built for them.

Actors: The Right Execution Model

What’s the runtime that supports this kind of messaging and state isolation? That’s where actors come in.

An actor is:

This is ideal for agents:

The actor model, when combined with message-passing routing patterns, becomes a natural foundation for building distributed, fault-tolerant, and evolvable systems. Reactive Messaging Patterns

A2A, Agent Cards, and Protocol-Driven Routing

Enter Google’s A2A spec.

This isn’t just another transport.

It brings:

Using A2A, your planner agent doesn’t need to know internal URLs or auth details.

It just says: “I need an agent that can apply_discount” and the A2A runtime handles the route.

This is Content-Based Routing made dynamic: messages flow not based on hardcoded rules but on declared capabilities and metadata.

Actor-Style Routing in Practice

Here’s how this looks using a hybrid actor + EIP setup:

pseudocode inside a planner agent

message = receive()
 
if message.task_type == "invoice_adjustment":
    target = registry.lookup("apply_credit")
    send(target, message)
 
elif message.task_type == "translate":
    lang_agent = registry.lookup("translate", lang=message.payload.lang)
    send(lang_agent, message)

Or using A2A’s routing envelope:

{
  "task": "translate",
  "data": {
    "text": "Bonjour",
    "target_lang": "en"
  },
  "requirements": ["low_latency", "eu_region"]
}

This pattern scales.

Agents don’t contain the logic.

The routing layer (A2A or pub/sub + actor registry) handles dispatch.

Coordinators Are Just Process Managers

Whether you’re using LangGraph or Dapr Workflows, the same thing is happening: some actor (or step) is deciding what happens next based on what just happened.

This is the Process Manager pattern.

It:

In LangGraph, the planner is a graph edge that emits new calls.

In Dapr, it’s a durable workflow.

Either way, it’s a coordinator—not unlike what you’d use in a long-lived SAGA.

Summary: What We’re Actually Building

LLM agents are just services with probabilistic dispatch logic.

Once you connect more than one, you are building a distributed system.

That means:

If you ignore this, you’ll build brittle, unobservable spaghetti.

If you embrace it, you’ll get resilient, swappable, evolvable agent meshes.

And yes, they’ll still hallucinate. But at least they’ll do it predictably.

Coming Next

In the next Post, we’ll look at state sharing models for agent systems:

The future of agents is distributed. Let’s build it on purpose.


Suggest Changes

Next Post
Agents Are Still Just Software