Run an agent
run_agentSend one message to an agent and let it work, like calling it through the API. Runs cost money and the agent's tools can send messages or change things in connected apps, so: call it first without approved to get the cost, tell the person, and only call again with approved: true after they say yes. A quick answer comes back at once; otherwise the result has a run_id, and you call get_run every 10 seconds or so until done is true. If the agent stops for a tool approval, get_run lists it: show the person and use decide_approval with their answer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>",
"message": "<message>"
},
"name": "run_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | What to ask the agent, with everything it needs. | |
| agent_id | Yes | The agent to run (search_agents). | |
| approved | No | true only after the person has agreed to this run and its cost. | |
| thread_id | No | Keeps a conversation: runs with the same thread_id see the earlier messages. Leave out for a one-off. | |
| response_format | No | A JSON Schema the answer must follow, for this run only. |