Skip to content
Back to full roadmap
topicadvanced

Agent Communication Protocols

How do agents exchange messages? Direct call, message queue, shared state, event bus.

2 hours1 prereqs

4 main patterns:

  1. Direct call — sync, agent A calls agent B .invoke(). Simple but tight coupling.
  2. Message queue — async, agent A writes to queue, agent B consumes. Loose coupling, easy scaling.
  3. Shared state — agents read/write common state (LangGraph approach). Easy coordination but race conditions.
  4. Event bus — pub/sub, agents subscribe to events. Complex but flexible.

Practical: small teams = direct call. Large long-running systems = queue + durable state (Temporal/Inngest).

Prerequisites