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:
- Direct call — sync, agent A calls agent B
.invoke(). Simple but tight coupling. - Message queue — async, agent A writes to queue, agent B consumes. Loose coupling, easy scaling.
- Shared state — agents read/write common state (LangGraph approach). Easy coordination but race conditions.
- 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).