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_id- The ID of a monitor that has an agent.
Response
200The monitor's agent. A tick is one run of the agent.
monitor_id- The ID of the monitor.
status- The agent's status:
compiling,ready,failed,paused,endedordeleted. query- The monitor's query.
frequency- How often the agent runs.
spec_version- The version of the agent's plan. It goes up each time the plan changes.
spec- The plan the agent follows: the kind of object it looks for, the criteria each one must meet, and where it searches.
nullbefore the first plan. counts- How many objects the agent found, by status, and its alerts in the last 24 hours.
ticks[]- The agent's latest ticks: when each ran, what it cost, why it stopped and what it found.
next_tick_at- When the agent runs next, or
null. spend_usd- What the agent has spent on this monitor, in US dollars.
budget- The monitor's own budget, as set with Update the agent, or
null. source_health[]- How each source of the plan did: its rows, new objects, cost and status.
compile- The agent's latest plan job: its
job_id,statusanderror. See Get a job. running_job- The job that runs now, or
null. suggested_prompts[]- Messages you can send the agent to start a chat.
Errors
| Status | Code | When |
|---|---|---|
401 | unauthorized | The API key is missing or not valid. |
403 | forbidden | The API key cannot read monitors (a GET) or change them (the other methods). |
404 | not_found | The monitor is not in your key's project, or it has no agent. |
429 | rate_limited | Your 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.