Skip to main content
POST
Add a revision
Minimum role required: Member

Authorizations

X-Axilio-Api-Key
string
header
required

Customer API key (axl_ prefix).

Path Parameters

agent_id
string<uuid>
required

The agent's id.

Body

application/json

Request body for adding a revision. The new revision becomes the agent's current one.

kind
enum<string>
required

code needs code; instructions needs instructions.

Available options:
code,
instructions
code
string

The script, for a code revision.

instructions
string

The task, for an instructions revision.

Maximum string length: 20000
message
string

A note on the revision.

Maximum string length: 500
on_failure
enum<string>

For a code revision, what a run does when a step fails. fail fails the run. ask pauses the run for a person (reason step_check_failed), who retries the step or completes the run with its output. repair hands the run to the agent, which finishes the task and proposes a fixed revision for a person to promote. Defaults to the current revision's, or fail.

Available options:
fail,
ask,
repair

Response

Created

One revision of an agent: instructions or code. Revisions are append-only.

agent_id
string<uuid>
required

The agent the revision belongs to.

author_user_id
string<uuid> | null
required

The user who added the revision. Null once they have deleted their account.

created_at
string<date-time>
required

When the revision was added.

id
string<uuid>
required

The revision's id.

kind
enum<string>
required

code: the revision is a script. instructions: the revision is a task the agent works through a model.

Available options:
code,
instructions
revision
integer<int64>
required

The revision's number within the agent, from 1.

base_revision_id
string<uuid>

On a proposed fix, the revision the repaired run ran.

code
string

The script, on a code revision.

instructions
string

The task, on an instructions revision.

message
string

The author's note on the revision.

on_failure
enum<string>

On a code revision, what a run does when a step fails: fail the run, ask (pause for a person, who retries the step or completes the run), or repair (the agent takes over and proposes a fix).

Available options:
fail,
ask,
repair
promoted_at
string<date-time>

On a proposed fix, when it was promoted to current.

proposal_state
enum<string>

Set when the revision is a fix a repair proposed, which is not current until promoted: waiting to be promoted, superseded (the agent has moved on from the revision it fixes, so it can't be promoted), or promoted.

Available options:
waiting,
superseded,
promoted
source_run_id
string<uuid>

The run the revision came from: on a proposed fix, the run whose repair wrote it; on an agent saved from a run, that run.