Skip to main content
Glama

Watch an agent run

watch_agent_run
Read-onlyIdempotent

Wait on one agent run and follow what its agent does, instead of polling get_agent_run. The call returns when the run ends, when its mission moves to another stage, or after maxSeconds. While it waits, each agent event (a thought, a tool call, a plan update, an error) is sent as a progress notification when the request has a progress token. The result has the status of the run, the stage of its mission, ended, the reason it returned, the last 20 events and a cursor. When the run is still running, call it again with since set to the cursor. A run that already ended returns at once. If your client ends a call after 60 seconds, set maxSeconds below that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoThe cursor from an earlier result. Only the events after it are sent
sandboxIdYesAgent run id: the run's sandbox id, from list_agent_runs or get_mission
maxSecondsNoThe longest time to wait, in seconds (default 300, at most 600)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNoWhat to do next, when the run is still running
endedYesTrue when the run is no longer running
stageYesThe stage of the run's mission when the call returned
cursorYesThe id of the last event. Give it as since to continue
eventsYesThe last 20 events at most, oldest first
reasonYesWhy the call returned: the run ended, its mission moved to another stage, or maxSeconds passed
statusYesThe status of the run when the call returned
sandboxIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.