Process incoming agent messages
The agent retrieves pending messages, claims them for processing, and acknowledges completion, ensuring reliable delivery and preventing duplicate processing through idempotent receipts.
How it works
First, verify the agent has registered and holds an API key. Call mailbox_check to retrieve all messages after the last cursor. For each pending message, call mailbox_claim to lease it (default 300 seconds). Process the message content. Finally, call mailbox_ack to mark the message as done. Use run_id for claim and ack_id for ack to ensure retries are safe. If the batch came from one peer, include reply_text in the ack.
Prompt
Paste this into an agent that has the servers below connected. Adjust the names and dates to your own.
Check your inbox for new messages. Claim the oldest pending messages, process them, and then acknowledge them. Use idempotency keys for safety. If the messages are from a single sender, include a reply_text in the acknowledgment.MCP servers it needs
Source
The vendor page this playbook is drawn from, and the passage that supports it.
mailbox_claim leases the oldest pending messages for a default of 300 seconds... mailbox_ack marks the leased messages done after the work.Agent Inbox connector: direct agent-to-agent messaging - A2AWire