An agent's runs, newest first
const url = 'http://localhost:11044/api/v1/agents/example/runs';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:11044/api/v1/agents/example/runs \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The agent’s name
Query Parameters
Section titled “Query Parameters”How many, at most (default 50, at most 500)
Responses
Section titled “Responses”Its runs: routines, repairs, duty checks and conversations
One run of an agent’s work as the run ledger keeps it: a routine, a repair, a duty check, a conversation or a test, from start to end. Listed by GET /agents/{name}/runs and returned by GET /agents/{name}/runs/{id}
object
Name of the agent holding the work; null for a routine no agent holds
SHA-256 hex digest of that signed version; null with agentVersion
The signed version number the run went as; null when no signed version governs the agent, or no agent holds the work
For a run that answers a colleague, the names of the agents that asked, in order; empty otherwise
ISO-8601 instant the run ended; null while it is running
Why it failed or timed out, up to 1,000 characters; for a duty check, why its state is unknown. Null otherwise
The run’s id, run_ and a UUID: the {id} in GET /agents/{name}/runs/{id}
ROUTINE, REPAIR (a duty’s repair run on one violation), DUTY_CHECK, CONVERSATION or TEST
For a duty check, source warnings that left its rows sound, such as a cost note from a realm’s producer
True when the run only observed: its writes were refused and recorded as calls it would have made
RUNNING, DONE, FAILED, TIMED_OUT (including a run the appliance lost track of, closed once 30 minutes old), or SKIPPED (a scheduled firing that did not run; output says why). A duty check that could not read the world is FAILED
The last 4,000 characters it printed, the partial result when it timed out; for a skipped firing, why it did not run
Id of the user whose world the run belongs to
The agent as a principal, agent:<name>@<world>, apart from the account in runAs; null for duty checks, skipped firings and work no agent holds
For a duty check, how many violations it set out to repair; null for other runs
Ids of the approval requests it raised
Username of the account the run acted as
What its model calls cost, in US cents, keyed by model name
object
What its model calls cost in total, in US cents; 0 until the run ends
ISO-8601 instant the run started
What started it: schedule, signal:<type>, repair:<duty>, message, test, or on-demand
For a duty check, the violations it found; null for other runs and for a check that could not read the world
What ran: the routine’s name, the duty’s name for a duty check, or conversation:<agent> for a conversation
Example
[ { "kind": "ROUTINE", "outcome": "RUNNING" }]No authenticated principal
A refusal with a machine-readable code and a plain-language message. ApiErrorAdvice answers it for a failed validation, a missing resource or a conflicting state, and some controllers answer it directly
object
Machine-readable key to branch on, such as validation_failed, unknown_field, not_found or conflict. Open: a surface may answer codes of its own
Extra context where there is some: a sentence, such as the fields a body may carry, or an object of machine fields in the server’s own words, such as api_approval_unapprovable’s reason (the declaration reader’s code, MALFORMED or FIELD_INVALID), field (where it points, [0].headers[1] or apis/spec.json#/paths/~1things/post) and rule (the sentence the reader states for it), or a refused Realm capture’s reason (SYMLINK, TOO_LARGE, …) and file (the path relative to the Realm root); never the caller’s or a Realm’s text; null otherwise
A plain-language explanation, written to be shown. Never carries an exception message
The body the servlet error dispatch answers for a status raised by an exception rather than written by the endpoint. Every failure except 404, which answers the not-found HTML page
object
The status’s standard reason phrase, such as Bad Request or Forbidden
The request path that failed
The HTTP status code, repeated from the status line
Example generated
{ "code": "example", "detail": "example", "message": "example"}
