Description
Blocks until the specified AI session finishes its current turn (returns to Paused or Stopped after running) and returns the full transcript of messages plus every tool/function call result generated during the session. Use this after AISessionStart to drive a one-shot AI workflow and inspect everything the agent did.
Notes:
- Pair with
AISessionStartto drive a one-shot AI workflow. - Polls the session’s runtime status until it observes Running and then returns to Paused or Stopped, then pulls the full message list and tool call list ordered by time.
- If the session does not return to idle within
Timeoutmilliseconds, the cmdlet returns whatever it has accumulated so far (with a TimedOut indicator) rather than throwing. - Output is formatted as Markdown so the LLM can read the conversation, the final assistant reply, and each tool call’s name, status, arguments, and output.
Example:
{
"function_call": {
"name": "AISessionWait",
"arguments": {
"SessionId": "d4e8a2c1-6f3b-4a9e-8b7c-1a2b3c4d5e6f",
"Timeout": 600000,
"MaxOutputLength": 20000
}
}
}
