inbox_wait
Wait for and retrieve incoming messages for an agent in real time, returning immediately if pending or waking on new arrival. Supports kind/topic filters and configurable timeout.
Instructions
消息总线【实时唤醒读】(异步阻塞, 事件驱动不阻塞服务器): 读某 agent 消息; 有已 pending → 立即返回(授 60s 租约可 ack); 无 → 挂起等待, 当 bus_send/agent_send_message 发来即被【即时唤醒】返回, 或超时(wait_ms 默认30s 上限120s 返回 {items:[], timed_out:true})。可选 kind/topic 过滤订阅。返回 { items:[{id,from,to,kind,topic,priority,body,created_at}], timed_out }。消费用 inbox_ack。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | 仅唤醒/返回此 kind 的消息(message/signal) | |
| agent | Yes | ||
| topic | No | 仅订阅/返回此 topic 的消息 | |
| wait_ms | No | 最长等待 ms, 默认30000, 上限120000 |