Multi-Agent

Messaging

Agent messaging enables communication between Claude sessions working on the same project.


Sending Messages

Direct Message

agent_send_message({
  recipient_session_id: "session-def456",
  performative: "REQUEST",
  content: "Can you review the API changes?"
})

Broadcast

Omit recipient_session_id to send to all agents:

agent_send_message({
  performative: "INFORM",
  content: "Deployment complete, API is live"
})

Message Types (Performatives)

TypePurposeExample
REQUESTAsk for action"Can you fix the failing tests?"
OFFEROffer help"I can handle the database migration"
DECLINEDecline request"I'm busy with auth, can't take this"
INFORMShare information"Tests are now passing"
QUERYAsk for information"What's the status of the API?"
REPORTReport results"Completed migration, 3 tables updated"

Conversations

Link messages to conversation threads:

agent_send_message({
  performative: "REQUEST",
  content: "Can you review PR #123?",
  conversation_id: "pr-123-review"
})

// Reply in same conversation
agent_send_message({
  performative: "INFORM",
  content: "LGTM, approved with minor comments",
  conversation_id: "pr-123-review"
})

Reading Messages

// All messages
agent_get_messages({})

// Unread only
agent_get_messages({ unread_only: true })

// From specific agent
agent_get_messages({ sender_session_id: "session-abc" })

// In conversation
agent_get_messages({ conversation_id: "pr-123-review" })

Marking as Read

// Mark specific messages
agent_mark_messages_read({
  message_ids: ["msg-1", "msg-2"]
})

// Mark all as read
agent_mark_messages_read({})

Link messages to tasks:

agent_send_message({
  performative: "REPORT",
  content: "Completed the authentication implementation",
  related_task_id: "task-abc123"
})

Best Practices

  1. Use appropriate performatives - Helps recipients understand intent
  2. Keep messages concise - Get to the point
  3. Use conversations - Group related messages
  4. Link to tasks - Provide context for task-related updates
  5. Check messages regularly - Stay coordinated with team
Previous
Task Management