Skip to content

Monitor HTTP API

Generated from the monitor’s OpenAPI document (src/contraagent/_internal/monitor/openapi.json).

Contract version 3.5.0. All endpoints are GET.

EndpointAnswersWhat
/api/infoInfoThe title, the panel tabs to offer, and the version of this contract.
/api/runsRunSummary[]Every run directory, newest activity first.
/api/hostsHostsThe hosts that drive the runs, and each account's utilization over every run.
/api/trends?from&to&tz&run_group&stubTrendsWhat the runs of a period add up to, day by day.
/api/trends/panels/{name}?from&to&tz&run_groupTilesBody | TableBody | ColumnsBody | LinesBody | HeatmapBody | HBarsBody | StatusGridBody | NoteBody | CodeBody | TreeBody | BlocksBody | objectOne trend panel's body: its fn(runs, period) over the runs of the period, made on a panel thread, and kept for the same period over the same runs (Monitor.trends_panel).
/api/runs/{run}/journal?sinceJournalPageJournal rows after line offset since; total is the next offset.
/api/runs/{run}/planPlanEvery queued task with its dependencies and state, and the groups the UI draws as columns.
/api/runs/{run}/outputsOutputsEvery declared output/input contract: its file, the model it must satisfy, its status.
/api/runs/{run}/definitionsTaskDefinition[]What defined each kind of task in this run.
/api/runs/{run}/cursorCursorViewThe resume cursor; {} when the run keeps none.
/api/runs/{run}/procsProcsThe run's live agent launches, process tree and Python tasks.
/api/runs/{run}/task/{key}TaskDetailOne task, by its key: journal rows, live launches, definition, input/output, transcript name.
/api/runs/{run}/stream/{key}?sinceStreamPageA page of task key's normalized transcript from line since; since=0 is the tail page.
/api/runs/{run}/panels/{name}TilesBody | TableBody | ColumnsBody | LinesBody | HeatmapBody | HBarsBody | StatusGridBody | NoteBody | CodeBody | TreeBody | BlocksBody | objectOne run panel's body: a typed body (tiles, a table, charts), or any JSON object; made on a panel thread.
/events?runSSE: RunEventThe run, live: journal rows as they land, then each other view when it changes.
/events/stream?run&keySSE: StreamMessageTask key's transcript, live: the tail page, then the events after it as they are written.

Messages of /events?run=

EventModelSent
journalJournalMessageOne journal row, sent once per row: the whole journal on connect, then each new row.
procsProcsMessageThe live processes, sent when a launch starts or ends (not on every age tick).
planPlanMessage
outputsOutputsMessage
cursorCursorMessageThe resume cursor, or null for a run that keeps none.
panel:<name>PanelMessageA domain panel's body (PanelBody), sent when it changed. {"error": ...} when the panel raised.
readyReadyMessageSent once per connection, after the first round of messages: the journal replayed so far and the current value of every other view. A row that arrives after it is new, not part of the replay.

Messages of /events/stream?run=&key=

EventModelSent
streamStreamMessage/events/stream: the first message is the transcript's tail page, then each message carries only the events after the previous one.