Use real IDs
Get workspace, agent and task IDs from read operations such aslist_workspaces. Read a task or pending action before you change it, and don’t guess a recipient or workspace from a display name.
Give an agent a task
submit_task creates a task and starts the agent. It needs agents:write. The agent works with its own connected apps and follows its usual approval rules. A successful response means the task started, not that it’s done.
- Get an
agentIdfrom a read operation. - Call
submit_taskwith the workspace, the agent and what you want done. The API reference lists the fields. - Save the task ID it returns.
- Check progress and output with
list_task_runsandget_run. - Send follow-ups with
send_task_message, once the user has approved the message.
Approve or reject an action
Pending actions are changes an agent wants to make. Reading them needsworkspace:read. Approving, rejecting and editing drafts needs approvals:write.
- List the task’s pending actions and read the one you want.
- Show the user the recipients, content and changes.
- Approve or reject that exact action ID, as the user decided.
- Call
get_pending_actionto follow it until it finishes.
get_pending_action to see when it’s done.
Polling
Poll with backoff, stop once you have a result, and honorRetry-After. Don’t run several polls for the same task at once. If an action fails, tell the user rather than approving it again.
Long output comes in pages. Keep reading with the continuation field until there’s nothing left.

