Skip to content

One run, with its receipts

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

The agent’s name

id
required
string

The run’s id

The run and its receipts

Media typeapplication/json

One run of an agent, with a receipt for every decision made on its behalf; answered by GET /agents/{name}/runs/{id}

object
receipts
required

Receipts for the decisions the Gatekeeper made during the run, in the order they were made

Array<object>

One decision the Gatekeeper made about a call that would change something on a run’s behalf (acted, held for a person, or refused), or a person’s answer to such a request. Chained per owner by hash so an edit shows; returned with its run by GET /agents/{name}/runs/{id}

object
agent

Name of the agent holding the work; null when no agent holds it

string
agentVersion

The holding agent’s governing signed version number when the decision was made; null when none governs it

integer format: int32
at
required

ISO-8601 instant it was written, to the millisecond

string format: date-time
decidedBy

Username of the person who approved or rejected; null when the Gatekeeper decided

string
decision
required

act (let through), request (held for a person), refused, or a person’s approved or rejected

string
entityKeys
required

Business records the call’s arguments name, as field=value: a field called id, key, number, res_id or external_id, or ending Id, _id, Key, _key, Url or _url. At most 20

Array<string>
hash
required

SHA-256 hex over everything else this receipt says, as canonical JSON with keys sorted and times as ISO-8601 text

string
id
required

The receipt’s id, rc_ and a UUID

string
inputHash
required

SHA-256 hex of the call’s input as sent, or of the empty string when it had none

string
ownerId
required

Id of the user whose chain the receipt belongs to

string
previousHash
required

The hash of the receipt before it in the owner’s chain; empty for the first

string
reason
required

Why, in words, up to 500 characters; empty when none was given

string
requestId

Id of the request it raised or answered; null for act and refused

string
rule
required

What decided: authority, halted, egress, observing, never or review for the Gatekeeper, person for a person’s answer; refused when a refusal named no rule

string
runId

Id of the run the decision was made for; null for a person’s answer to a request that names no run

string
seq
required

Position in the owner’s chain, counting from 1

integer format: int64
verb
required

The verb called, as the gateway names it

string
work
required

Name of the routine the call was made from

string
run
required

The run itself: what started it, its state, timing and output

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

{
"run": {
"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, such as the fields a body may carry; null otherwise

string
message
required

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

string

Example generated

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

No such run of this agent’s in your world