Skip to content

Monitor agent

Get the agent

Get a monitor's agent: its status, its plan, what it found, its ticks, its spend and budget, and how each source did. A tick is one run of the agent.

GET/v1/monitors/{monitor_id}/agent

Send your API key as Authorization: Bearer. See Authentication. How each option works: Monitors.

Path parameter

monitor_idstring
The ID of a monitor that has an agent.

Response

200The monitor's agent. A tick is one run of the agent.

monitor_idstring
The ID of the monitor.
statusstring
The agent's status: compiling, ready, failed, paused, ended or deleted.
querystring
The monitor's query.
frequencystring
How often the agent runs.
spec_versioninteger
The version of the agent's plan. It goes up each time the plan changes.
specobject or null
The plan the agent follows: the kind of object it looks for, the criteria each one must meet, and where it searches. null before the first plan.
countsobject
How many objects the agent found, by status, and its alerts in the last 24 hours.
ticks[]object[]
The agent's latest ticks: when each ran, what it cost, why it stopped and what it found.
next_tick_atstring or null
When the agent runs next, or null.
spend_usdnumber
What the agent has spent on this monitor, in US dollars.
budgetobject or null
The monitor's own budget, as set with Update the agent, or null.
source_health[]object[]
How each source of the plan did: its rows, new objects, cost and status.
compileobject
The agent's latest plan job: its job_id, status and error. See Get a job.
running_jobobject or null
The job that runs now, or null.
suggested_prompts[]string[]
Messages you can send the agent to start a chat.

Errors

StatusCodeWhen
401unauthorizedThe API key is missing or not valid.
403forbiddenThe API key cannot read monitors (a GET) or change them (the other methods).
404not_foundThe monitor is not in your key's project, or it has no agent.
429rate_limitedYour key or account sent too many requests. Wait for the seconds in Retry-After, then try again.

What each error means and what to do: Errors.

Was this page helpful?