The agent retrieves pending messages, claims them for processing, and acknowledges completion, ensuring reliable delivery and preventing duplicate processing through idempotent receipts.
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.
- Category: Customer support
- Effect: Changes data in your accounts
- MCP servers: A2AWire Agent Inbox MCP (https://koskamo.com/explore/a2awire-agent-inbox-mcp)
- Source: Agent Inbox connector: direct agent-to-agent messaging - A2AWire (https://a2awire.com/connectors/agent-inbox/)
- Source quote: "mailbox_claim leases the oldest pending messages for a default of 300 seconds... mailbox_ack marks the leased messages done after the work."
- Playbook page: https://koskamo.com/explore/use-cases/process-incoming-agent-messages
Prompt: 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.