Skip to content

An agent's runs, newest first

GET
/api/v1/agents/{name}/runs
curl --request GET \
--url http://localhost:11044/api/v1/agents/example/runs \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'
name
required
string

The agent’s name

limit
integer format: int32

How many, at most (default 50, at most 500)

Its runs: routines, repairs, duty checks and conversations

Media typeapplication/json
Array<object>

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
agent

Name of the agent holding the work; null for a routine no agent holds

string
agentDigest

SHA-256 hex digest of that signed version; null with agentVersion

string
agentVersion

The signed version number the run went as; null when no signed version governs the agent, or no agent holds the work

integer format: int32
chain
required

For a run that answers a colleague, the names of the agents that asked, in order; empty otherwise

Array<string>
endedAt

ISO-8601 instant the run ended; null while it is running

string format: date-time
error

Why it failed or timed out, up to 1,000 characters; for a duty check, why its state is unknown. Null otherwise

string
id
required

The run’s id, run_ and a UUID: the {id} in GET /agents/{name}/runs/{id}

string
kind
required

ROUTINE, REPAIR (a duty’s repair run on one violation), DUTY_CHECK, CONVERSATION or TEST

string
Allowed values: ROUTINE REPAIR DUTY_CHECK CONVERSATION TEST
notes
required

For a duty check, source warnings that left its rows sound, such as a cost note from a realm’s producer

Array<string>
observing
required

True when the run only observed: its writes were refused and recorded as calls it would have made

boolean
outcome
required

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

string
Allowed values: RUNNING DONE FAILED TIMED_OUT SKIPPED
output
required

The last 4,000 characters it printed, the partial result when it timed out; for a skipped firing, why it did not run

string
ownerId
required

Id of the user whose world the run belongs to

string
principal

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

string
repairs

For a duty check, how many violations it set out to repair; null for other runs

integer format: int32
requests
required

Ids of the approval requests it raised

Array<string>
runAs
required

Username of the account the run acted as

string
spendByModel
required

What its model calls cost, in US cents, keyed by model name

object
key
additional properties
number format: double
spendCents
required

What its model calls cost in total, in US cents; 0 until the run ends

number format: double
startedAt
required

ISO-8601 instant the run started

string format: date-time
trigger
required

What started it: schedule, signal:<type>, repair:<duty>, message, test, or on-demand

string
violations

For a duty check, the violations it found; null for other runs and for a check that could not read the world

integer format: int32
work
required

What ran: the routine’s name, the duty’s name for a duty check, or conversation:<agent> for a conversation

string

Example

[
{
"kind": "ROUTINE",
"outcome": "RUNNING"
}
]

No authenticated principal

One of:

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
code
required

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

string
detail

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

message
required

A plain-language explanation, written to be shown. Never carries an exception message

string

Example generated

{
"code": "example",
"detail": "example",
"message": "example"
}