Skip to content
Letta Platform Letta Platform Letta Docs
Sign up
Tutorials
Multi-agent patterns

Multi-agent patterns

Build multi-agent systems with message passing, shared memory, and coordination patterns.

Letta provides built-in tools for cross-agent communication to build multi-agent systems. Agents can communicate via message passing or share state via shared memory blocks.

The built-in tools for multi-agent communication support both synchronous and asynchronous communication between agents on your Letta server.

There are three built-in tools for cross-agent communication:

ToolTypeUse case
send_message_to_agent_asyncAsyncFire-and-forget messaging between agents
send_message_to_agent_and_wait_for_replySyncRequest/response between two agents
send_message_to_agents_matching_all_tagsSyncSupervisor broadcasts to worker groups
sequenceDiagram
    autonumber
    Agent 1->>Agent 2: "Hi Agent 2 are you there?"
    Agent 2-->>Agent 1: "Your message has been delivered."
    Note over Agent 2: Processes message
    Agent 2->>Agent 1: "Hi Agent 1, yes I'm here!"
    Agent 1-->>Agent 2: "Your message has been delivered."

The send_message_to_agent_async tool sends a message to another agent and returns immediately. The message contains a receipt indicating the sender, so the target agent can reply.

sequenceDiagram
    autonumber
    Agent 1->>Agent 2: "Hi Agent 2 are you there?"
    Note over Agent 2: Processes message
    Agent 2->>Agent 1: "Hi Agent 1, yes I'm here!"

The send_message_to_agent_and_wait_for_reply tool sends a message and waits for the target agent’s response before returning.

sequenceDiagram
    autonumber
    Supervisor->>Worker 1: "Let's start the task"
    Supervisor->>Worker 2: "Let's start the task"
    Supervisor->>Worker 3: "Let's start the task"
    Note over Worker 1,Worker 3: All workers process their tasks
    Worker 1->>Supervisor: "Here's my result!"
    Worker 2->>Supervisor: "This is what I have"
    Worker 3->>Supervisor: "I didn't do anything..."

The send_message_to_agents_matching_all_tags tool sends a message to a group of agents matching specific tags. This is synchronous - the result includes responses from each matched agent.

Choose a pattern based on your use case: