Skip to main content
Tools

Agent-to-Agent Messages

Let one agent hand work to another agent without waiting for it.

A tool can send another agent a message. Here a coder agent hands a finished branch to the reviewer for that repository and keeps working.

Coder agentReviewer agentkey: repositoryConversationrequestReviewreturns right awaysubmit
  • The reviewer is keyed by repository, so every coder working on the same repository reaches the same reviewer, and its conversation remembers past reviews.
  • The requestReview action gets Pi’s harness as c.pi and submits the request to the reviewer’s root conversation without waiting. The request is saved before the action returns, so the review runs even if the coder’s request goes away.
  • When the reviewer is busy with another review, the request waits as a follow-up and runs next.
  • The coder’s request_review tool sits next to CodingTools in its registry. The reviewer runs on a different model family than the coder.

To wait for the other agent’s answer instead, see Subagents. See Pi for more on c.pi.