Reference
Agents
The agents endpoints of the HTTP API.
GET /agents
List who can do work for the signed-in person.
Puts the Observe Agent, the person’s connected agents and the service accounts that take runs in one read. observe_agent names the configured provider and model (never an address or a key); provider and model are null while the agent is off. runtime is always sidecar, the observe-agent process. Its last_7_days covers every built-in run of the workspace for an Admin (scope is workspace) and only the caller’s own runs for anyone else (scope is you). connected lists only the caller’s own live connections, newest first and at most 100. grant_id is the id a mention names as @[Name](grant:<grant_id>), and a service account’s id is the one in @[Name](service_account:<id>). service_accounts lists every account that takes runs, ordered by name and at most 100, with last_7_days for an Admin and null for anyone else, because a person needs the names to mention them. present is true while the agent holds a run or asked for work in the last 40 seconds, and presence says which: working while it holds a run, listening when it asked for work in the last 40 seconds and offline otherwise; see docs/reference/states.md. Each last_7_days counts the runs created in the last seven days assigned to that agent: failed leaves out canceled runs, cost_usd is the sum of the recorded run costs and null when a finished run has none, because an unknown price is never counted as zero, and median_queue_wait_seconds is the median time from request to start over the runs that started, null when none did. writes_7d counts the activity rows of the last seven days written by the caller over MCP under the connection’s client name, so two connections of one client name share the count. Only signed-in people may call it: a service-account key gets 403 user_session_required.
Responses
| Status | Description | Body |
|---|---|---|
200 |
The agents. | AgentsOverview |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not a signed-in person (user_session_required). |
Error |
500 |
The server failed to handle the request. | Error |
GET /agents/runs
List the recent runs of one agent.
Lists the runs assigned to one agent, newest first, so the Agents page can show the work behind its seven day numbers. kind is builtin for the Observe Agent, grant for one of the caller’s connected agents or service_account for a service account that takes runs. id is the grant id or the service account id, and it is required for grant and service_account and refused for builtin. For builtin and service_account, an Admin sees every run of the agent (scope is workspace) and anyone else only the runs they requested (scope is you). A grant is listed only for the person it belongs to, revoked or expired connections included so the history stays readable, and any other grant id answers 404 not_found, an Admin’s too. An unknown service account answers 404 not_found. Suggestion runs are left out because they have no page to open, although the seven day numbers of GET /agents still count them; archived runs are included. A dashboard or observation in a folder the caller cannot see comes back as null, never with its id or title. openable is true only when the caller requested the run, because a run page opens only for the person who asked for it. title is the requester’s title or the start of the prompt, and never empty. Only signed-in people may call it: a service-account key gets 403 user_session_required.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
kind (required) |
query | "builtin", "grant", "service_account" |
|
id |
query | string (uuid) |
The grant id or service account id; required for grant and service_account, refused for builtin. |
limit |
query | integer |
Between 1 and 50. Default 20. |
cursor |
query | string |
The next_cursor of the previous page. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
One page of runs. | AgentRunPage |
400 |
The kind, id, limit or cursor is not valid (invalid_request). |
Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not a signed-in person (user_session_required). |
Error |
404 |
The grant is not the caller’s or the service account does not exist (not_found). |
Error |
500 |
The server failed to handle the request. | Error |
GET /agents/working
List the active runs working on the caller’s things.
Lists the runs that are queued, running or canceling and that the caller requested, or that act on a dashboard or observation the caller created, newest first. A dashboard or observation counts only while it is in a folder the caller can see, and comes back as null otherwise, never with its id or title. An Admin gets no wider view: the list is about the caller’s own runs and things. Suggestion runs and archived runs are left out. mine is true when the caller requested the run. title is the requester’s title or the start of the prompt for a run the caller requested, and null for a run someone else requested, because a request is private to its author. agent names who works on it: Observe Agent for the built-in agent, the client name of a connected agent or the name of a service account. There is no cursor: limit caps the list and truncated is true when more active runs exist. Only signed-in people may call it: a service-account key gets 403 user_session_required.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit |
query | integer |
Between 1 and 50. Default 20. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The active runs. | WorkingRuns |
400 |
The limit is not valid (invalid_request). |
Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not a signed-in person (user_session_required). |
Error |
500 |
The server failed to handle the request. | Error |
Generated from api/openapi.yaml at c770e5e0. Report a problem.