agents

Fetches one of an agent's revisions with its instructions or code. A revision of another agent is 404.

get/agents/{agent_id}/revisions/{revision_id}

Request

Path parameters

agent_idstring uuid required

The agent's id.

revision_idstring uuid required

The revision's id.

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

agent_idstring uuid required

The agent the revision belongs to.

author_user_idstring uuid nullable required

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

base_revision_idstring uuid

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

codestring

The script, on a code revision.

created_atstring date-time required

When the revision was added.

idstring uuid required

The revision's id.

instructionsstring

The task, on an instructions revision.

kind'code' | 'instructions' required

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

messagestring

The author's note on the revision.

on_failure'fail' | 'ask' | 'repair'

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).

promoted_atstring date-time

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

proposal_state'waiting' | 'superseded' | 'promoted'

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.

revisioninteger required

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

source_run_idstring 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.

Example response

{
  "$schema": "/api/v1/AgentRevision.json"
}

Changes