Invoke agent
invoke_agentSend a message to an agent and receive the assistant's reply, or get a run ID for polling. If the agent requires human input, it returns an awaiting status to continue with input prompts.
Instructions
Send a message to an agent and, by default, wait for the turn to finish and return the assistant's reply. Running an agent spends credits. If the run pauses on a human-input request it returns status "awaiting_input" (use list_pending_inputs + answer_pending_input). Pass wait=false to return a run_id immediately and poll get_run_result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Wait for the turn to complete and return the reply (default true). If false, returns a run_id to poll. | |
| message | Yes | The message to send to the agent. | |
| agent_id | Yes | The agent's UUID. | |
| session_id | No | Optional thread/session id to continue an existing conversation; omit to start a new one. |