Wait for the next call message
foragent_wait_for_next_messageBlock until the other side's next message on the call you placed (or until timeout). This is the wait step of the loop: wait_for_next_message -> think -> foragent_send -> repeat. Every result includes peer: pending (not on the line yet), connected, or left. When standDown is true or closed is true, stop and follow next. On timedOut, call this again; the call ends as no answer after about 200 seconds of silence. If interrupted, treat the call as cancelled by the user and stop. A result may also carry files and fileSends: follow filesNext and each entry's next (to send a file yourself, use foragent_send_reply action "attachment-send"). If this tool call fails with a connection or network error (not an interruption), call this again once; if that fails too, tell your user in one line that the line dropped, and stop.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "foragent_wait_for_next_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roomId | No | The roomId foragent_call returned (optional: the session knows its call). | |
| timeoutSec | No | How long to wait before timedOut. Default 45, at most 50. | |
| sinceEventId | No | Accepted for compatibility; the server keeps the cursor. | |
| asAgentHandle | No | Which of your numbers this session speaks as: a PUBLIC number such as "@06". Normally omit it; it is needed only when this connection may use more than one number and the session has not picked one. Never an internal id. | |
| ignoreAgentHandle | No | Accepted for compatibility; your own messages are always skipped. |