Skip to content
Docs menu

skills

Robot skills: what a robot can be asked to do. Each skill runs one reflex policy, and a person installs each version. The range of every input is the range the robot's sim tests passed.

5 operations · 17 schemas

GET /v1/robots/{owner}/{repo}/skills

List what a robot can be asked to do

listRobotSkills · scope none

Returns the robot's skills: stand, walk, turn and recover, each with its inputs, its pre- and post-conditions, its fallback skill and the version a person installed. An input's allowed range is the range the robot's sim tests passed. The hub derives it from the stored results, and nobody types it in. A skill with no installed version is listed when a version waits for a person. A robot the caller cannot see is 404. Answers 409 if the repo kind is not robot.

Parameters

listRobotSkills parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

Responses

listRobotSkills responses
StatusDescriptionBody
200

The robot's skills.

RobotSkillList
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
409

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json

GET /v1/robots/{owner}/{repo}/skills/{skill}

Get one skill with its version history

getRobotSkill · scope none

Returns one skill and every version proposed for it, newest first. Each version names the policy file it runs, the range each input may take, and the sim tests that range rests on. The answer is 404 when the robot is invisible to the caller or no version of this skill was proposed.

Parameters

getRobotSkill parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

skillrequiredpathRobotSkillName

The skill's name.

Responses

getRobotSkill responses
StatusDescriptionBody
200

The skill and its versions.

RobotSkill
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
409

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json

POST /v1/robots/{owner}/{repo}/skills/{skill}/versions

Propose a policy as the next version of a skill

proposeRobotSkillVersion · scope key:write

Proposes one policy file as the next version of this skill on this robot. The caller must be able to write the robot. The hub reads the file's stamp and its sim tests on this robot, then derives the version's envelope. The envelope holds the range of each input and the fallen starts a recovery passed. Each of these is a 422:

  • the policy is not a reflex policy
  • its stamp fills another skill's slot (STAND is stand, LOCO is walk or turn, RECOVERY is recover)
  • no finished sim test of these bytes on this robot passed a test this skill reads

A sim test counts when the hub ran it, or when a writer of the robot started it. A test the policy's writers ran on their own machine does not count on another owner's robot. The version waits as proposed until a person installs it with installRobotSkillVersion. Proposing the same bytes again refreshes the waiting version's envelope and answers 200. Audited as skill.propose.

Parameters

proposeRobotSkillVersion parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

skillrequiredpathRobotSkillName

The skill's name.

Request body

application/json · required · RobotSkillVersionCreate

proposeRobotSkillVersion request body
FieldTypeDescription
modelrequiredstring

length ≤ 129 · pattern ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$

owner/slug of a policy repo visible to the caller.

onnx_pathFilePath | null

The ONNX file. Omit it when the repo's root holds exactly one.

Responses

proposeRobotSkillVersion responses
StatusDescriptionBody
200

The waiting version for these bytes, with its envelope refreshed.

RobotSkillVersion
201

The new version, waiting for a person.

RobotSkillVersion
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
409

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

POST /v1/robots/{owner}/{repo}/skills/{skill}/versions/{version}/install

Install a skill version (web session only)

installRobotSkillVersion · scope session

session scope: a person signed in to the web app. No API key of any scope can call this. The person must be able to write the robot. envelope_digest names the envelope the person read. A version whose envelope changed since is 409. The version becomes the skill's installed one, and the one it replaces becomes superseded. A computer running the bridge picks it up the next time a person adds the robot there. 409 when the version is not proposed. Audited as skill.install.

Parameters

installRobotSkillVersion parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

skillrequiredpathRobotSkillName

The skill's name.

versionrequiredpathinteger

≥ 1 · ≤ 100000

The version number, from 1.

Request body

application/json · required · RobotSkillInstall

installRobotSkillVersion request body
FieldTypeDescription
envelope_digestrequiredSha256

Responses

installRobotSkillVersion responses
StatusDescriptionBody
200

The skill, with this version installed.

RobotSkill
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
409

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

POST /v1/robots/{owner}/{repo}/skills/{skill}/versions/{version}/decline

Decline a proposed skill version (web session only)

declineRobotSkillVersion · scope session

session scope. A person who can write the robot declines a waiting version, with a reason the proposer reads. The installed version stays as it was. 409 when the version is not proposed. Audited as skill.decline.

Parameters

declineRobotSkillVersion parameters
NameInTypeDescription
ownerrequiredpathHandle

Repo owner handle (username or org slug).

reporequiredpathSlug

Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

skillrequiredpathRobotSkillName

The skill's name.

versionrequiredpathinteger

≥ 1 · ≤ 100000

The version number, from 1.

Request body

application/json · required · RobotSkillDecline

declineRobotSkillVersion request body
FieldTypeDescription
reasonrequiredstring

length 1–500 · pattern \S

Why the version is declined. The proposer reads it on the version's page. Spaces alone are not a reason.

Responses

declineRobotSkillVersion responses
StatusDescriptionBody
200

The skill, with this version declined.

RobotSkill
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
409

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json

Schemas (17)

The schemas these operations reach before any other tag’s do. A type that links elsewhere is rendered on that tag’s page.

RobotSkillList

object

RobotSkillList fields
FieldTypeDescription
robotrequiredstring

length ≤ 129

itemsrequiredarray of RobotSkill

items ≤ 8

RobotSkillName

string

one of stand · walk · turn · recover

A skill a robot can be asked to do. stand holds the robot up, walk follows a velocity command, turn turns in place and recover gets up after a fall.

RobotSkill

object

RobotSkill fields
FieldTypeDescription
namerequiredRobotSkillName
robotrequiredstring

length ≤ 129

summaryrequiredstring

length ≤ 200

inputsrequiredarray of RobotSkillInputName

items ≤ 3

preconditionsrequiredarray of RobotSkillCondition

items ≤ 2

postconditionsrequiredarray of RobotSkillCondition

items ≤ 2

fallbackrequiredRobotSkillName | null

The skill that runs when this one ends in a fall, or null to stop.

installedrequiredRobotSkillVersion | null
waitingrequiredinteger

≥ 0

How many proposed versions wait for a person.

versionsarray of RobotSkillVersion

items ≤ 100

Every version, newest first. Present on getRobotSkill only.

RobotSkillVersionCreate

object

RobotSkillVersionCreate fields
FieldTypeDescription
modelrequiredstring

length ≤ 129 · pattern ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$

owner/slug of a policy repo visible to the caller.

onnx_pathFilePath | null

The ONNX file. Omit it when the repo's root holds exactly one.

RobotSkillVersion

object

RobotSkillVersion fields
FieldTypeDescription
versionrequiredinteger

≥ 1

statusrequiredstring

one of proposed · installed · superseded · declined

policyrequiredRobotSkillPolicy
enveloperequiredRobotSkillEnvelope
evidencerequiredarray of RobotSkillEvidence

items ≤ 32

proposed_byrequiredRobotSkillActor
proposed_atrequiredstring (date-time)
decided_byrequiredRobotSkillActor | null
decided_atrequiredstring (date-time) | null (date-time)
reasonrequiredstring | null

length ≤ 500

RobotSkillInstall

object

RobotSkillInstall fields
FieldTypeDescription
envelope_digestrequiredSha256

RobotSkillDecline

object

RobotSkillDecline fields
FieldTypeDescription
reasonrequiredstring

length 1–500 · pattern \S

Why the version is declined. The proposer reads it on the version's page. Spaces alone are not a reason.

RobotSkillInputName

string

one of vx · vy · yaw_rate

A skill input. vx and vy are the body-frame forward and sideways speed in m/s, yaw_rate the turn rate in rad/s.

RobotSkillCondition

string

one of standing · fallen

A state of the robot a skill starts from or leaves it in. standing means upright on its feet, fallen means it is not.

RobotSkillPolicy

object

The policy file a version runs. model is null when the caller cannot see the policy's repo.

RobotSkillPolicy fields
FieldTypeDescription
modelrequiredstring | null

length ≤ 129

pathrequiredFilePath
sha256requiredSha256
control_classrequiredstring

one of reflex

control_rate_hzrequirednumber
slotrequiredSlot | null
certifiedrequiredstring | null

one of certified · revoked

Lucen's word on these bytes, where Lucen certifies files for this robot.

in_factoryrequiredboolean

True when the robot's factory install carries these bytes.

RobotSkillEnvelope

object

What the version may be asked to do, derived by the hub from its sim tests. digest is the SHA-256 of the envelope's canonical JSON without the digest, which an install names.

RobotSkillEnvelope fields
FieldTypeDescription
inputsrequiredarray of RobotSkillInput

items ≤ 3

combinedrequiredstring

one of tested · untested · failed · not_applicable

Whether commands on more than one input at once were tested. When they were not, or one failed, a call keeps only its largest input.

startsrequiredarray of string

items ≤ 16

The fallen starts a recover version got up from in its tests.

survivesrequiredarray of string

items ≤ 32

The pushes and floors the version stayed up through.

cellsrequiredarray of RobotSkillCell

items ≤ 128

digestrequiredSha256

RobotSkillEvidence

object

One sim test a version's envelope rests on.

RobotSkillEvidence fields
FieldTypeDescription
rollout_idrequiredId
batteryrequiredstring

length ≤ 32

seedsrequiredinteger

≥ 0

passedrequiredinteger

≥ 0

totalrequiredinteger

≥ 0

hub_ranrequiredboolean
finished_atstring (date-time) | null (date-time)

RobotSkillActor

object

RobotSkillActor fields
FieldTypeDescription
kindrequiredstring

one of person · key · agent

handlerequiredstring | null

length ≤ 64

Slot

string

one of STAND · LOCO · RECOVERY · KICK_TOE · KICK_SIDE

A skill slot on the robot, the place a policy file goes.

RobotSkillInput

object

One input and the range it may take. The range runs from zero out to the last tested value on each side before the first failed one. A call outside it is clamped to it and logged.

RobotSkillInput fields
FieldTypeDescription
namerequiredRobotSkillInputName
unitrequiredstring

one of m/s · rad/s

minrequirednumber
maxrequirednumber
testedrequiredarray of object

items ≤ 64

Every value this input was tested at alone, with whether it passed.

valuerequirednumber
passedrequiredboolean

RobotSkillCell

object

One sim test a version's envelope reads.

RobotSkillCell fields
FieldTypeDescription
rollout_idrequiredId
namerequiredstring

length ≤ 64

kindrequiredstring

one of command · stand · survive · recovery

What the test scores. command scores tracking at a velocity command. stand scores posture at rest. survive scores staying up under a push or on a slippery floor. recovery scores getting up from a fallen start.

commandRobotSkillCommand | null
passedrequiredboolean
detailstring | null

length ≤ 500

RobotSkillCommand

object

RobotSkillCommand fields
FieldTypeDescription
vxrequirednumber
vyrequirednumber
yaw_raterequirednumber