Skip to content
Docs menu

agent

The hub's cloud agent. A session works toward a goal with the hub's own tools and a sandboxed shell. It acts as a short-lived key scoped below its creator's. Spends past a pre-approved budget wait for a person. Everything it does is recorded as an append-only event stream.

17 operations · 41 schemas

GET /v1/agent/sessions

List agent sessions

listAgentSessions · scope key:read

Sessions visible to the caller (owner, creator, or a member of the owning org), newest first. No session is public.

Parameters

listAgentSessions parameters
NameInTypeDescription
statusqueryAgentSessionStatus
limitqueryinteger

default 20 · ≥ 1 · ≤ 100

Page size.

cursorquerystring

length ≤ 512

Opaque cursor from the previous page's next_cursor.

Responses

listAgentSessions responses
StatusDescriptionBody
200

Page of sessions.

AgentSessionPage
401

Missing or invalid credentials.

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

POST /v1/agent/sessions

Start an agent session (the hub's cloud agent works toward a goal)

createAgentSession · scope key:train

{goal, robot?, campaign?, budget_usd, cap_usd?, scopes?, owner?} → a session whose first turn is queued at once. The agent loop runs on the hub (one arq job per turn, state in Postgres). A frontier model sits behind the coach's model interface, extended with tool use. It calls the hub's MCP tools in-process, as the session's own short-lived key. Where the deployment configures one, it also calls a Modal sandbox shell whose network reaches only the hub.

Keys. The hub mints a key for every turn, bound to the session (api_keys.agent_session_id). The key expires on its own, and is revoked when the turn yields or the session ends. Its scope is the one the session was granted: scopes, which is never above the creator's own. No agent key can call a session-scoped operation or approve its own spend (resolveAgentApproval is 403 to every agent key). No agent key can create another session or approve a device handoff either.

Money. Two numbers.

budget_usd is the spend a person pre-approves for the tools that cost money. Those are submit_training on a priced executor, a Modal rollout_in_sim, serve_model on Modal, plan_task and the coach's two paid tools. Inside the budget, the tool runs and says so. Above it, the session pauses with an approval_requested event (waiting_on_you) until a person answers.

cap_usd (default $10) caps the session's own model + sandbox spend. The model is billed at its vendor's list price, plus 5% on a hub that takes payments. Each call reserves count_tokens + max_tokens first, and settles on the reported usage, cache fields included. The next call is refused at the cap. The sandbox is billed at Modal's sandbox rate × 1.1, only while active. Every call and every sandbox interval is one ledger_entries row.

The model is billed to the Anthropic key of the session owner's workspace (listModelKeys). A workspace with no key answers 402 with type: model_key_required, unless the hub serves it with its own key.

Until a payment system exists, every account (an org shares one) gets a $5 monthly allowance for what the hub pays. That is the sandbox, and model calls on the hub's own key. There is nothing beyond it: 402 when it is spent. Only claude-sonnet-5 is offered.

An account may run up to AGENT_MAX_LIVE_SESSIONS (3) working sessions at once. A working session is running, waiting on an event or waiting on you. A sleeping session does not count. A fourth is 409 naming the three.

Plan first. Nothing billable runs before a person approves a plan. On a task that needs compute, the agent's first move is a plan (listAgentPlans). Until one is approved, every training run, round, rollout, render, endpoint and orchestration plan the agent asks for is refused. Its tools refuse them, and the hub's own routes refuse them for its key. Model turns may run, and a session that only answers a question needs no plan. A person who starts the session with plan_first: false lets the hub approve a plan for them. The hub does so when the plan is free or fits what is left of the free allowance. A plan that costs more still waits for them.

Context. context[] names the hub objects a session starts with ("Ask the agent about this model"). Each one is checked as the caller. Missing, private and the wrong kind are one 422 at context[i]. Each object is stored on the session. The model gets them on its first turn as a compact summary built from the hub's own reads. That summary is a notice event (code: context), which the page shows too.

Spends model dollars: key:train.

Request body

application/json · required · AgentSessionCreate

createAgentSession request body
FieldTypeDescription
goalrequiredstring

length 1–8000

What the agent should achieve, in plain words.

robotstring | null

length ≤ 160

owner/slug of a robot repo the goal is about. Validated like Recipe.robot: missing, private and malformed are one 422.

campaignstring | null

length ≤ 64

A campaign the session works inside, by id or slug. It must be an active campaign of the session's owner that the creator can see (422 otherwise). It is resolved on every spending call. A round the agent proposes INTO this campaign is auto-approved only when its cap is at or under the campaign's per_run_limit_usd. It must also fit in spend.remaining_usd. Anything else waits for a person.

The campaign's budget does not pay for spends outside this campaign (a round of another campaign, a standalone run, a coach call). So the workspace's rules judge them.

budget_usdnumber | null

≥ 0 · ≤ 1000

A total a person pre-approves for the session's spending tools, on top of the per-run limit. The spending tools cover GPU training on a priced executor, a Modal rollout, a Modal endpoint, a plan and a coach call. A call is auto-approved only while every approved call's cap, this one's included, fits in the total. Null: no session total, so the per-run limit alone decides. 0: every spending call asks. The total does not cover the model or sandbox spend. Those fall under cap_usd and the allowance.

auto_approve_per_run_usdnumber | null

≥ 0 · ≤ 1000

This session's per-call auto-approve limit. It may only LOWER the workspace's limit (AGENT_AUTO_APPROVE_PER_RUN_USD, $3.00). A spending call whose cap is above it asks a person. Inside a campaign the campaign's own rules apply instead. Null: the workspace's.

cap_usdnumber | null

> 0 · ≤ 1000

Cap on the session's own model + sandbox spend (AGENT_DEFAULT_CAP_USD, $10, when null). The next model call is refused at it.

modelstring | null

length ≤ 64

The model the loop runs on (AGENT_MODEL, claude-sonnet-5, when null). On the free allowance no other model is offered (422).

scopesarray of ApiKeyScope | null

items ≤ 3

Scopes the session's keys carry. The session acts with the highest one named. That scope may not exceed what the creating credential was granted (403 otherwise). Null: the creator's own.

ownerstring | null

length ≤ 64

Who the session is billed to: the creator (null) or an org handle the creator is a member of. The allowance and the working-session cap are per owner.

sandboxboolean

default true

Offer the agent a sandbox shell (when the deployment configures one).

contextarray of AgentContextRef

items ≤ 8

Hub objects the session starts with. Each is checked as the caller. An object that is missing, private or the wrong kind gets 422 at context[i]. The error does not reveal whether an object exists. The hub summarises each object for the model's first turn from its own reads:

  • a run's status, gate, config groups and checkpoint gates
  • a model's card, contract and the run that trained it
  • a robot's card and interface
  • a dataset's meta
  • a rollout's verdict
  • a method's registry row: what it needs, what it gets, where it trains, whether its checkpoints are tested in simulation
plan_firstboolean

default true

True: the agent shows its plan and waits for a person to approve it before anything runs. False: the hub approves the plan for the person when the plan is free. It does the same when the plan fits what is left of the free monthly allowance. A plan that costs more still waits for a person. Only a signed-in person may turn it off (403 for an API key).

computeAgentCompute | null

Where the person wants the work to run. The agent is told, and a plan whose runs go elsewhere is rejected before a person sees it. Null: the agent chooses.

kindAgentSessionKind

default "general"

train_task makes the session a training task, as the Train page starts one. The agent reads the robot's training history first. It states the plan, the time and the cost before anything runs. It reports while the run trains, and gives a verdict at the end. A training task always shows its plan first, unless its campaign runs unattended (422 otherwise).

Responses

createAgentSession responses
StatusDescriptionBody
201

Session created; its first turn is queued.

AgentSession
401

Missing or invalid credentials.

Problemapplication/problem+json
402

The account's monthly allowance is used up. Or the workspace needs an Anthropic key (model_key_required) or reached its monthly model cap (model_cap_reached). settings_url says where a person fixes the last two.

Problemapplication/problem+json
403

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

Problemapplication/problem+json
409

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

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json
503

A service this endpoint needs is not configured in this deployment. The API boots with zero secrets. An endpoint that needs one says so instead of returning a stack trace.

Problemapplication/problem+json

GET /v1/agent/sessions/{session_id}

Get an agent session (status, spend, what it waits on, pending approvals)

getAgentSession · scope key:read

Everything a page needs beside the event stream:

  • status and why;
  • the three spend lines (model at the vendor's price, sandbox × 1.1, GPU committed from the budget);
  • the allowance;
  • what the agent waits on;
  • the pending approvals;
  • the sandbox's state;
  • last_event_id, where streamAgentEvents resumes.

A session you may not see is 404.

Parameters

getAgentSession parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

Responses

getAgentSession responses
StatusDescriptionBody
200

The session.

AgentSession
401

Missing or invalid credentials.

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

POST /v1/agent/sessions/{session_id}/messages

Send the agent a message (a user turn)

postAgentMessage · scope key:train

Appends a user message and queues a turn. A message wakes any session that is not canceled or failed:

  • A sleeping one.
  • A waiting_on_you one. A reply in words is how a person changes a proposed plan. The agent answers with a new version.
  • A waiting_on_event one, whose wait it interrupts.
  • A done one, which it reopens.

On a running one, the message is handed to the model at its next step. 409 only on a canceled or failed session. A message never counts against the working-session cap. It spends model dollars, so it needs key:train. An agent's own key is 403. A workspace that has no Anthropic key the hub may use answers 402, and no turn is queued.

Parameters

postAgentMessage parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

Request body

application/json · required · AgentMessageCreate

postAgentMessage request body
FieldTypeDescription
textrequiredstring

length 1–8000

Responses

postAgentMessage responses
StatusDescriptionBody
202

Message recorded; a turn is queued.

AgentSession
401

Missing or invalid credentials.

Problemapplication/problem+json
402

This workspace has no key the hub may use for the model's vendor, or a limit is reached: its own key's monthly cap, or the workspace's limit. type and errors[].type say which: model_key_required, model_cap_reached or billing.cap_reached. settings_url is where a person adds a key, raises the cap or opens Billing. Nothing was spent.

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

GET /v1/agent/sessions/{session_id}/events

Stream a session's events (SSE, resumable)

streamAgentEvents · scope key:read

Server-Sent Events from the session's append-only event table, in the order they were written. Every frame carries id: <event id> (a ULID), event: <kind> and data: <AgentEvent JSON>. A reconnecting EventSource sends Last-Event-ID, and the stream resumes strictly after it. The after query parameter does the same. With follow=true the stream stays open until the session ends. While nothing happens, it sends : keepalive comments. event: end always closes it, with the session's status. Same shape as streamRunLogs. The kinds are message, tool_use, tool_result, terminal, approval_requested, approval_resolved, status, usage, sandbox, notice, error, plan, decision and round. Each kind and its data are as AgentEvent defines them. Replaying the stream plus getAgentSession (and the digest, objects and decisions) is everything the agent page needs.

Parameters

streamAgentEvents parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

followqueryboolean

default false

Keep the stream open until the session ends.

afterqueryId

Resume strictly after this event id (the Last-Event-ID header wins when both are sent).

Last-Event-IDheaderId

The id of the last event the client saw (sent by EventSource on reconnect).

Responses

streamAgentEvents responses
StatusDescriptionBody
200

SSE event stream.

stringtext/event-stream
401

Missing or invalid credentials.

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

POST /v1/agent/sessions/{session_id}/approvals/{approval_id}

Approve or deny a spend the agent asked for

resolveAgentApproval · scope key:train

Answers a spend decision (approval_requested). A spend the rules do not allow becomes one:

  • any compute call outside the approved plan, whatever it costs;
  • a coach call over the per-run limit or the budget.

The wait is non-blocking: the agent keeps working while it waits. On approve, its next turn runs the held call exactly as it was asked for before anything else. The held call is no longer a dry run. On deny, the agent is told the call did not run and why. raise_budget_to approves this call and grants the session a standing allowance for the rest of its life. Later compute calls whose caps fit in what is left of it run without asking (the rule reads session_grant). The session's budget is raised to cover the allowance.

A call outside the approved plan is decided only by a signed-in person's session. Such a call asks a person, and a key is not a person. So every API key is 403, the owner's train key included. The owner's train key may still decide a coach call over the per-run limit or the budget. Every agent session key is 403 for everything, including this session's own. An agent never approves its own spend. 409 once the approval is decided or expired (expires_at, the session's window). 409 also when the session is canceled / failed.

Parameters

resolveAgentApproval parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

approval_idrequiredpathId

Agent spend approval id (aappr_...).

Request body

application/json · required · AgentApprovalDecision

resolveAgentApproval request body
FieldTypeDescription
decisionrequiredstring

one of approve · deny

notestring | null

length ≤ 1000

Shown to the agent with the decision.

raise_budget_tonumber | null

≥ 0 · ≤ 1000

approve only. It means "approve up to $X for the rest of the session". This call runs. From now on, compute calls whose caps fit in what is left of $X (this call's cap included) run without asking. They run even outside the plan. The session's budget_usd is raised to cover it. Must be at least this call's cap_usd (422 otherwise).

Responses

resolveAgentApproval responses
StatusDescriptionBody
200

The decided approval.

AgentApproval
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/agent/sessions/{session_id}/cancel

Cancel an agent session

cancelAgentSession · scope key:train

Ends the session now (canceled). Pending approvals are withdrawn and the session's keys are revoked. The sandbox is terminated and its last interval is billed. A model call already in flight finishes and is billed (the ledger records it). Nothing the model asked for after that call runs. Runs, rollouts or plans the agent started are not touched. Cancel them on their own pages. 409 when the session already ended.

Parameters

cancelAgentSession parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

Responses

cancelAgentSession responses
StatusDescriptionBody
200

The canceled session.

AgentSession
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

POST /v1/agent/sessions/{session_id}/end

End an agent session (done; a reply reopens it)

endAgentSession · scope key:train

The person ends the session: status done, stop_code: ended. Unlike cancelAgentSession, this is not final. Its sandbox snapshot is kept and a message reopens it (postAgentMessage wakes a done session). Pending decisions are withdrawn: a spend or a plan nobody answered does not survive the end. The session's keys are revoked. Runs, rollouts or rounds it started are not touched. 409 on a canceled or failed session, or one that is already done. An agent's own key is 403.

Parameters

endAgentSession parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

Responses

endAgentSession responses
StatusDescriptionBody
200

The ended session.

AgentSession
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

GET /v1/agent/sessions/{session_id}/plans

The plans the agent proposed in this session, newest version first

listAgentPlans · scope key:read

Every version of the session's plan. The agent proposes a plan before anything that costs compute. Nothing billable happens before a person approves a plan. A person approves the latest version (approveAgentPlan, session-only), or replies in words. After a reply, the agent proposes the next version, and the version it replaces reads edited. Only the latest version can be approved.

Parameters

listAgentPlans parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

Responses

listAgentPlans responses
StatusDescriptionBody
200

The plans.

AgentPlanPage
401

Missing or invalid credentials.

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

GET /v1/agent/sessions/{session_id}/plans/{plan_id}

One version of the session's plan

getAgentPlan · scope key:read

The plan as the agent page draws it. It holds:

  • its rounds;
  • contingent rounds and their condition;
  • "then" and "not doing";
  • the total cap.

Each round is what will become a campaign round's locked spec. It holds one change and its keys, and gates with the prediction written beside each. The hypothesis is shown beside the gates and is never counted. A round also holds the gate while training, the stop rules, the estimate and the cap. Estimates are the hub's own (estimateRun's function). Nothing in a plan is spent until a person approves it.

Parameters

getAgentPlan parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

plan_idrequiredpathId

Agent plan id (aplan_...), one version of the session's plan.

Responses

getAgentPlan responses
StatusDescriptionBody
200

The plan.

AgentPlan
401

Missing or invalid credentials.

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

POST /v1/agent/sessions/{session_id}/plans/{plan_id}/approve

Approve the agent's plan (a signed-in person only)

approveAgentPlan · scope session

Session-only, like a device approval: no API key of any scope approves a plan. So no agent can approve its own. The plan is the contract: approving it pre-approves each round's cap. A round can start now when it has no contingent_on and no parent_from. In a session with a campaign, this request creates and locks every such round through createRound's own path. The three rules and the campaign's budget are checked. A refusal (422 with the rule reasons, 409 on the budget) records nothing and leaves the plan proposed. In a session without a campaign, each such round's run is created through createRun's path. The later rounds start when the agent asks for them by key (start_planned_round), exactly as approved. Anything the agent then wants that the plan does not name asks a person again, whatever it costs. 409 when the plan is not the latest version or is not proposed. 409 also when the session is canceled or failed.

Beyond the free allowance. When the plan can cost more than the owner's free monthly allowance covers (allowance.needs_confirmation), the person must confirm it with confirm_beyond_allowance: true. Without it the answer is 409 with the amount, and nothing is created.

Parameters

approveAgentPlan parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

plan_idrequiredpathId

Agent plan id (aplan_...), one version of the session's plan.

Request body

application/json · AgentPlanApprove

approveAgentPlan request body
FieldTypeDescription
notestring | null

length ≤ 1000

Shown to the agent with the approval.

confirm_beyond_allowanceboolean

default false

The person confirms the plan may cost more than the free allowance covers (AgentPlan.allowance.beyond_usd). Required when allowance.needs_confirmation is true.

Responses

approveAgentPlan responses
StatusDescriptionBody
200

The approved plan, with the rounds it created.

AgentPlan
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

GET /v1/agent/sessions/{session_id}/decisions

The session's decisions: plan, spend, shortlist, handoff

listAgentDecisions · scope key:read

The typed decision cards, all in one shape:

  • a plan, answered by approveAgentPlan or a reply in words;
  • a spend outside the approved plan, answered by resolveAgentApproval (with expires_at and raise_budget_to);
  • a shortlist of checkpoints for the real robot, answered by decideRound {action: shortlist}. The 20-seed scan runs first, then one consent request per checkpoint;
  • a handoff: a device consent request. It only links to the consent page and is never approved here.

answer_via names the operation that answers each. Newest first. status filters the list.

Parameters

listAgentDecisions parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

statusqueryAgentDecisionStatus

Responses

listAgentDecisions responses
StatusDescriptionBody
200

The decisions.

AgentDecisionPage
401

Missing or invalid credentials.

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

GET /v1/agent/sessions/{session_id}/digest

"Since you left": what happened in the session since the viewer last looked

getAgentDigest · scope key:read

The hub generates it from the session's events and the objects they link. No AI model writes it. It costs nothing, reads the same every time, and cannot state a fact the rows do not hold. The agent's own words appear only as quotes (a round card's "Next", a spend's proposal). The lines come in this order, each with the ids to open:

  • runs that finished or failed;
  • the gates their checkpoints got;
  • the round's verdict by its locked gates;
  • the tripwire;
  • videos rendered or rendering;
  • handoffs;
  • what needs you.

since defaults to the viewer's last_seen_at (else the session's start). Unless mark=false, reading it moves the viewer's last_seen_at to now. An agent's own key never marks.

Parameters

getAgentDigest parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

sincequerystring (date-time)

Lines about what happened after this instant (default the viewer's last_seen_at).

markqueryboolean

default true

Move the viewer's last_seen_at to now after reading (default true).

Responses

getAgentDigest responses
StatusDescriptionBody
200

The digest.

AgentDigest
401

Missing or invalid credentials.

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

GET /v1/agent/sessions/{session_id}/objects

The session's objects grouped by state: Needs you, Running, Ready for review, Done

listAgentObjects · scope key:read

The overview column of the session page. It lists every object the session touched, derived from its events' links and its plan. Each object gets one line of facts, and the lines are grouped. Needs you: pending decisions, and the spends an older session still holds the old way. Those are pending AgentApprovals with no decision card (kind: approval), so a page never has to patch them in. A render's line says how long is left, from the hub's measured render time (AgentRenderRef.expected_s). Running: queued or running runs, renders and the shortlist's scans. Ready for review: checkpoints that PASS the round's locked gates (a shortlist's candidates once one is proposed). Done: finished runs and renders, and plan rounds that were not needed. The groups always come back in that order, empty ones included.

Parameters

listAgentObjects parameters
NameInTypeDescription
session_idrequiredpathId

Agent session id (asess_...).

Responses

listAgentObjects responses
StatusDescriptionBody
200

The objects.

AgentObjects
401

Missing or invalid credentials.

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

GET /v1/tasks

List the agent's tasks, sessions and robot plans in one list

listTasks · scope key:read

Everything the hub's agent works on for the caller, newest first. These are its sessions, which train and test policies, and its plans on a connected robot. No task is public.

Each task has a stage. The hub derives it on every read from what exists: the task's plan, its runs, its sim tests and its deploy requests. Nothing about a stage is stored. The stages run planning, awaiting_approval, training, testing_in_sim, ready_for_review, deploy_pending_approval, then deployed, failed or stopped. A plan on a connected robot has no training stages.

Parameters

listTasks parameters
NameInTypeDescription
limitqueryinteger

default 20 · ≥ 1 · ≤ 100

Page size.

cursorquerystring

length ≤ 512

Opaque cursor from the previous page's next_cursor.

Responses

listTasks responses
StatusDescriptionBody
200

Page of tasks.

TaskPage
401

Missing or invalid credentials.

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

GET /v1/tasks/{task_id}

Get one task with its stages, evidence and deploy requests

getTask · scope key:read

One task. It shows the task's stage and why, the stages it has reached and when, and the runs it started. It also shows its sim tests with their verdicts, its deploy requests and what it has cost so far. A task you may not see is 404.

Parameters

getTask parameters
NameInTypeDescription
task_idrequiredpathId

A task's id, the id of its agent session (asess_...) or of its plan on a robot (plan_...).

Responses

getTask responses
StatusDescriptionBody
200

The task.

Task
401

Missing or invalid credentials.

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

POST /v1/tasks/{task_id}/stop

Stop a task and the work it started

stopTask · scope key:train

The task page's Stop. For a session the agent stops (endAgentSession): a message reopens it. Each of its training runs still queued is canceled, and each one running stops early and keeps its checkpoints (stopRun). For a plan on a connected robot the plan is canceled (cancelPlan). A deployment already approved keeps running: stop it from the robot's approval page. Stopping a task that has already stopped changes nothing and answers the task.

Parameters

stopTask parameters
NameInTypeDescription
task_idrequiredpathId

A task's id, the id of its agent session (asess_...) or of its plan on a robot (plan_...).

Responses

stopTask responses
StatusDescriptionBody
200

The task after the stop.

Task
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

Schemas (41)

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

AgentSessionStatus

string

one of running · waiting_on_you · waiting_on_event · idle · sleeping · done · failed · canceled

  • running: a turn is queued or in progress.
  • waiting_on_you: a decision waits for a person. It may be a plan, a spend or a shortlist (waiting_on.decision_ids), or an older session's held spend (pending_approvals). An event may still wake the agent meanwhile.
  • waiting_on_event: nothing waits for a person. The agent yielded until a run, rollout, gate, approval request, plan or endpoint moves (waiting_on).
  • sleeping: nothing is pending and the agent waits for a message. Its sandbox is snapshotted and stopped, so nothing bills. No idle timeout ends it any more.
  • idle: the old name for the same wait. It is no longer written. Read it as sleeping.
  • done: the person ended it (endAgentSession) or the agent declared the task complete. A message reopens it.
  • failed: a hard stop, with stop_code. The cause may be the session cap, the monthly allowance or the call cap. It may also be a refused or failing model, or the creating credential revoked.
  • canceled: cancelAgentSession.

Only failed and canceled are final.

AgentSessionPage

object

AgentSessionPage fields
FieldTypeDescription
itemsrequiredarray of AgentSession
next_cursorrequiredstring | null

AgentSessionCreate

object

AgentSessionCreate fields
FieldTypeDescription
goalrequiredstring

length 1–8000

What the agent should achieve, in plain words.

robotstring | null

length ≤ 160

owner/slug of a robot repo the goal is about. Validated like Recipe.robot: missing, private and malformed are one 422.

campaignstring | null

length ≤ 64

A campaign the session works inside, by id or slug. It must be an active campaign of the session's owner that the creator can see (422 otherwise). It is resolved on every spending call. A round the agent proposes INTO this campaign is auto-approved only when its cap is at or under the campaign's per_run_limit_usd. It must also fit in spend.remaining_usd. Anything else waits for a person.

The campaign's budget does not pay for spends outside this campaign (a round of another campaign, a standalone run, a coach call). So the workspace's rules judge them.

budget_usdnumber | null

≥ 0 · ≤ 1000

A total a person pre-approves for the session's spending tools, on top of the per-run limit. The spending tools cover GPU training on a priced executor, a Modal rollout, a Modal endpoint, a plan and a coach call. A call is auto-approved only while every approved call's cap, this one's included, fits in the total. Null: no session total, so the per-run limit alone decides. 0: every spending call asks. The total does not cover the model or sandbox spend. Those fall under cap_usd and the allowance.

auto_approve_per_run_usdnumber | null

≥ 0 · ≤ 1000

This session's per-call auto-approve limit. It may only LOWER the workspace's limit (AGENT_AUTO_APPROVE_PER_RUN_USD, $3.00). A spending call whose cap is above it asks a person. Inside a campaign the campaign's own rules apply instead. Null: the workspace's.

cap_usdnumber | null

> 0 · ≤ 1000

Cap on the session's own model + sandbox spend (AGENT_DEFAULT_CAP_USD, $10, when null). The next model call is refused at it.

modelstring | null

length ≤ 64

The model the loop runs on (AGENT_MODEL, claude-sonnet-5, when null). On the free allowance no other model is offered (422).

scopesarray of ApiKeyScope | null

items ≤ 3

Scopes the session's keys carry. The session acts with the highest one named. That scope may not exceed what the creating credential was granted (403 otherwise). Null: the creator's own.

ownerstring | null

length ≤ 64

Who the session is billed to: the creator (null) or an org handle the creator is a member of. The allowance and the working-session cap are per owner.

sandboxboolean

default true

Offer the agent a sandbox shell (when the deployment configures one).

contextarray of AgentContextRef

items ≤ 8

Hub objects the session starts with. Each is checked as the caller. An object that is missing, private or the wrong kind gets 422 at context[i]. The error does not reveal whether an object exists. The hub summarises each object for the model's first turn from its own reads:

  • a run's status, gate, config groups and checkpoint gates
  • a model's card, contract and the run that trained it
  • a robot's card and interface
  • a dataset's meta
  • a rollout's verdict
  • a method's registry row: what it needs, what it gets, where it trains, whether its checkpoints are tested in simulation
plan_firstboolean

default true

True: the agent shows its plan and waits for a person to approve it before anything runs. False: the hub approves the plan for the person when the plan is free. It does the same when the plan fits what is left of the free monthly allowance. A plan that costs more still waits for a person. Only a signed-in person may turn it off (403 for an API key).

computeAgentCompute | null

Where the person wants the work to run. The agent is told, and a plan whose runs go elsewhere is rejected before a person sees it. Null: the agent chooses.

kindAgentSessionKind

default "general"

train_task makes the session a training task, as the Train page starts one. The agent reads the robot's training history first. It states the plan, the time and the cost before anything runs. It reports while the run trains, and gives a verdict at the end. A training task always shows its plan first, unless its campaign runs unattended (422 otherwise).

AgentSession

object

One cloud-agent session. The conversation itself is the event stream (streamAgentEvents); this is the state around it.

AgentSession fields
FieldTypeDescription
idrequiredId
statusrequiredAgentSessionStatus
status_reasonstring | null
stop_codestring | null

Why a failed / done session stopped. The codes are session_cap, allowance, max_calls, refusal, model_error, credential_gone and canceled. ended means a person ended it. complete means the agent declared the task complete. The older expired and idle remain on old rows only.

titlestring | null

length ≤ 200

The session's title, set by the agent from the goal (e.g. "Omni walk · R4 lateral feed-forward"); null until it sets one.

summarystring | null

length ≤ 400

The status line the agent writes whenever it acts (the home page's second line). It says what the agent last did and what waits. The agent sets it with its set_summary tool. Otherwise it is the first sentence of the agent's last message in that turn. It is always the agent's own words.

summary_atstring (date-time) | null (date-time)
slept_atstring (date-time) | null (date-time)

When the session last went to sleep; null while it is awake.

last_seen_atstring (date-time) | null (date-time)

When the caller last read the session's digest (per viewer); the digest's default since.

planAgentPlanRef | null

The session's latest plan version (approved or not).

approved_plan_idstring | null

The plan version in force; null until a person approves one.

pending_decisionsinteger

Decisions waiting for a person (plan, spend, shortlist).

goalrequiredstring
robotstring | null
campaignstring | null
contextarray of AgentContextRef

The hub objects the session was started with (AgentSessionCreate.context), as stored.

plan_firstboolean

Whether a person approves every plan (AgentSessionCreate.plan_first).

computeAgentCompute | null

Where the person asked the work to run (AgentSessionCreate.compute).

kindAgentSessionKind
ownerrequiredRepoOwner
created_byUserPublic | null
modelrequiredstring
backendrequiredstring

anthropic or recorded. A replayed session must never read as a real one.

billingrequiredstring

one of platform · org_key · user_key

Who paid for the session's latest model call. platform is the hub's own key, at the vendor's price, drawn from the allowance or the plan. user_key is the owner's personal Anthropic key and org_key the organization's.

scopesrequiredarray of ApiKeyScope

What the session's keys are granted (the highest one is used).

budget_usdrequirednumber | null

The session's pre-approved total for spending tools. Null: the per-run limit alone.

auto_approve_per_run_usdrequirednumber

The per-call auto-approve limit in force (the workspace's, or lower for this session).

cap_usdrequirednumber
spendrequiredAgentSpend
allowancerequiredAgentAllowance
callsrequiredinteger
max_callsrequiredinteger
user_turnsinteger
waiting_onAgentWait | null
pending_approvalsrequiredarray of AgentApproval
sandboxrequiredAgentSandbox
last_event_idstring | null

Where streamAgentEvents resumes after (send it as Last-Event-ID).

created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
finished_atstring (date-time) | null (date-time)
expires_atrequiredstring (date-time)

The end of the session's current window (AGENT_SESSION_HARD_CAP_S, 24 h, from its start or its latest wake). Reaching it does not end the session. A spend asked for in the window expires then, and the sandbox cannot outlive the window. A message or a wake opens the next window.

AgentMessageCreate

object

AgentMessageCreate fields
FieldTypeDescription
textrequiredstring

length 1–8000

AgentApprovalDecision

object

AgentApprovalDecision fields
FieldTypeDescription
decisionrequiredstring

one of approve · deny

notestring | null

length ≤ 1000

Shown to the agent with the decision.

raise_budget_tonumber | null

≥ 0 · ≤ 1000

approve only. It means "approve up to $X for the rest of the session". This call runs. From now on, compute calls whose caps fit in what is left of $X (this call's cap included) run without asking. They run even outside the plan. The session's budget_usd is raised to cover it. Must be at least this call's cap_usd (422 otherwise).

AgentPlanPage

object

AgentPlanPage fields
FieldTypeDescription
itemsrequiredarray of AgentPlan

AgentPlan

object

The agent's plan for the session. It covers what the agent will train and how each round is judged. It also covers what the plan may cost and what the agent will not do. Nothing billable runs in a session before a person approves a plan. After that, the plan is the contract. Anything outside it asks a person.

AgentPlan fields
FieldTypeDescription
idrequiredId
session_idrequiredId
versionrequiredinteger

≥ 1

1 for the first proposal; each edit is the next version.

statusrequiredAgentPlanStatus
titlestring | null

length ≤ 120

The plan card's title, e.g. "R4, and R4b if needed".

summaryrequiredstring

length ≤ 1200

The agent's own paragraph about the plan, quoted as written.

campaignAgentCampaignRef | null

The session's campaign, whose rounds the plan's rounds become; null without one.

new_campaignAgentPlanNewCampaign | null

A campaign the hub creates when a person approves the plan. Only a training task without a campaign proposes one. Its rounds then become that campaign's rounds.

robotstring | null
roundsrequiredarray of AgentPlanRound

items ≤ 4

afterrequiredarray of string

items ≤ 8

"Then": what follows a PASS. Examples: the 20-seed band scan, a shortlist of up to 2, the robot handoff by consent.

not_doingrequiredarray of string

items ≤ 8

stop_rulesrequiredarray of string

The session-level stop rules in words (its budget, its model cap), hub-generated.

cap_usdrequirednumber

The most the plan can spend on compute: every round's cap, contingent rounds included.

est_usdnumber | null

The expected compute cost of the rounds that start at approval, where the planner models them.

budget_usdnumber | null

The session's budget_usd when the plan was proposed; the plan's cap_usd must fit in it.

model_estimate_usdnumber | null

A rough figure for the agent's own model turns across the plan, from the free allowance. It uses a flat per-checkpoint wake cost.

model_estimate_basisstring | null
proposed_atrequiredstring (date-time)
approved_atstring (date-time) | null (date-time)
approved_byUserPublic | null
approval_notestring | null
superseded_bystring | null

The plan version that replaced this one (edited).

decision_idstring | null

The plan decision that asked a person for it.

allowanceread-onlyAgentPlanAllowance | null

What the plan can cost against the owner's free monthly allowance.

AgentPlanApprove

object

AgentPlanApprove fields
FieldTypeDescription
notestring | null

length ≤ 1000

Shown to the agent with the approval.

confirm_beyond_allowanceboolean

default false

The person confirms the plan may cost more than the free allowance covers (AgentPlan.allowance.beyond_usd). Required when allowance.needs_confirmation is true.

AgentDecisionPage

object

AgentDecisionPage fields
FieldTypeDescription
itemsrequiredarray of AgentDecision

AgentDigest

object

AgentDigest fields
FieldTypeDescription
session_idrequiredId
sincerequiredstring (date-time)
untilrequiredstring (date-time)
markedrequiredboolean

Whether this read moved the viewer's last_seen_at to until.

linesrequiredarray of AgentDigestLine

AgentObjects

object

AgentObjects fields
FieldTypeDescription
session_idrequiredId
generated_atrequiredstring (date-time)
totalrequiredinteger
groupsrequiredarray of AgentObjectGroupItems

Always the four groups, in the order Needs you, Running, Ready for review, Done.

TaskPage

object

TaskPage fields
FieldTypeDescription
itemsrequiredarray of Task
next_cursorrequiredstring | null

Task

object

One thing the hub's agent works on: an agent session or a plan on a connected robot. Its stage is derived on every read.

Task fields
FieldTypeDescription
idrequiredId
kindrequiredTaskKind
titlerequiredstring

The agent's title for the task, else the start of its goal.

goalrequiredstring

What the person asked for, as written.

stagerequiredTaskStage
stage_reasonrequiredstring

One sentence saying why the task is at this stage.

waiting_on_yourequiredboolean

True while one of the task's decisions waits for a person. A decision is a plan, a spend, a shortlist or a deploy request.

stagesrequiredarray of TaskStageReached

The stages the task has reached so far, in order, each with when it first did.

statusrequiredstring

The session's or the plan's own status (AgentSessionStatus or PlanStatus).

robotstring | null

owner/slug of the robot the task is about.

deviceTaskDevice | null

The connected robot a plan works on.

ownerrequiredRepoOwner
backendstring | null

recorded when the agent's replies are replayed, so a replayed task never reads as a live one.

cost_usdrequirednumber

What the task has cost so far. It counts the agent's AI model calls and sandbox, plus its training runs on Lucen cloud. A running run counts its cost so far. A plan on a robot counts its AI model calls.

runsrequiredarray of TaskRun
evidencerequiredarray of TaskEvidence

The task's sim tests, newest first, at most 12.

deploy_requestsrequiredarray of TaskDeployRequest

The task's requests to run a policy on a robot, newest first.

created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
finished_atstring (date-time) | null (date-time)

AgentContextRef

object

A hub object a session starts with. The Train page passes the chosen context this way: the robot as robot, the method as method, a dataset as dataset and a base policy as model.

AgentContextRef fields
FieldTypeDescription
typerequiredstring

one of model · run · robot · dataset · rollout · method

refrequiredstring

length 1–160

owner/slug for a model, robot or dataset repo; the id for a run or a rollout; the method id of listMethods for a method.

AgentCompute

string

one of own_machine · cloud_cpu · cloud_gpu

own_machine: a runner on the person's own computer, free. cloud_cpu: Lucen cloud CPU, which the free monthly allowance covers. cloud_gpu: Lucen cloud GPU, which no allowance covers.

AgentSessionKind

string

one of general · train_task

general: a session that answers or acts on the goal as asked. train_task: a session whose goal is a policy to train.

AgentSpend

object

The session's three lines, in USD. model_usd is the vendor's list price, plus 5% on a hub that takes payments. sandbox_usd is Modal's sandbox rate × 1.1 for the intervals the sandbox was active. Both are sums of the session's ledger rows. gpu_budget_used_usd is what tools committed inside budget_usd (estimates: the most they can cost). gpu_approved_usd is what a person approved above it. The GPU itself is billed on its run or endpoint.

AgentSpend fields
FieldTypeDescription
model_usdrequirednumber
sandbox_usdrequirednumber
total_usdrequirednumber

model_usd + sandbox_usd: what counts against cap_usd and the allowance.

reserved_usdrequirednumber

A model call's reservation while it is in flight; 0 between calls.

gpu_budget_used_usdrequirednumber
gpu_approved_usdrequirednumber
callsrequiredinteger

Model calls made, each one a ledger row.

ledger_rowsrequiredinteger
gpu_usdrequirednumber

The header's third line: GPU dollars of the runs this session started. For a finished run it is the run's cost_usd. For a running priced run it is the cost so far (elapsed seconds x its billed rate, live). These dollars are billed on the runs and not on this session. They do not count against cap_usd or the allowance.

gpu_runsrequiredarray of AgentGpuRun
sandbox_staterequiredAgentSandboxState

AgentWait

object

What the session is blocked on.

AgentWait fields
FieldTypeDescription
kindrequiredstring

one of approval · run · rollout · approval_request · plan · endpoint · user · decision · campaign

  • approval: a spend a person must answer (approval_ids).
  • run / rollout / approval_request / plan / endpoint: a hub resource the agent asked to be woken about (ref, until).
  • user: the agent answered and waits for a message.
  • decision: decisions wait for a person (decision_ids). The agent may also be waiting on a hub resource. Then event names its kind, and ref / until / timeout_at describe it.
  • campaign: the hub refused the agent's round in an unattended campaign (ref), or paused its stretch. A person continues it. message is the hub's reason.
decision_idsarray of Id

The pending decisions (kind: decision).

eventstring | null

With kind: decision, the hub resource the agent also waits on (run, rollout, …).

refstring | null

The resource id waited on.

everyinteger | null

≥ 1

With until: progress, how many iterations apart the wakes are.

next_atinteger | null

≥ 0

With until: progress, the iteration that wakes the agent next.

untilstring | null

What wakes the agent:

  • finish: the resource ended.
  • gate: a gate verdict on the run, a tripwire, or the run's end.
  • decision: a person decided a device request.
  • claim: a server claimed the endpoint.
  • progress: the run reached the next multiple of every iterations, or it ended.
approval_idsarray of Id
sincerequiredstring (date-time)
timeout_atstring (date-time) | null (date-time)
messagestring | null

AgentSandbox

object

AgentSandbox fields
FieldTypeDescription
staterequiredAgentSandboxState
sandbox_idstring | null

Modal's id for the current container.

started_atstring (date-time) | null (date-time)

When the current active interval began.

active_secondsrequirednumber

Seconds billed so far over every interval.

cost_usdrequirednumber
expires_atstring (date-time) | null (date-time)

The sandbox's 24 h hard cap, from its first start.

egressrequiredarray of string

The only hosts the sandbox's network may reach: the hub's.

AgentCampaignRef

object

AgentCampaignRef fields
FieldTypeDescription
idrequiredId
slugrequiredstring
namerequiredstring
robotstring | null

owner/slug of the campaign's robot.

AgentPlanNewCampaign

object

The campaign a training task's plan asks for. It is created under the session's owner, on the session's robot, when a person approves.

AgentPlanNewCampaign fields
FieldTypeDescription
namerequiredstring

length ≤ 120

taskrequiredCampaignTask
budget_usdrequirednumber

≥ 0

The campaign's budget. It is at least the plan's cap, and at least one dollar.

AgentPlanRound

object

One round of a plan. It holds what createRound will lock: a name, the checkpoint the round resumes from, the spec and the recipe. It also holds what the hub derived from them. The spec holds:

  • ONE change and its keys
  • the hypothesis, shown beside the gates and never counted
  • the gates, each with the prediction written beside it
  • not-doing
  • tripwires
  • the iteration cap

In a session without a campaign the same shape describes a run. The recipe is what createRun receives. The spec is the record of the gates and predictions. No verdict is computed without a campaign.

AgentPlanRound fields
FieldTypeDescription
keyrequiredstring

length 1–16 · pattern ^[A-Za-z0-9][A-Za-z0-9._-]*$

The round's short label inside the plan, e.g. R4, R4b; unique per plan.

namerequiredstring

length 1–120

The round's name, e.g. "lateral feed-forward".

contingent_onstring | null

length ≤ 300

A contingent round's condition in words, e.g. "only if R4's vy±0.10 is still over the band at the scan". It never starts at approval. The agent starts it by key when it judges the condition met. The agent's reading is quoted on the round (note).

parentCheckpointRef | null

The checkpoint it resumes from; null trains from scratch (or from the campaign's root).

parent_fromstring | null

length ≤ 16

Instead of parent: the key of an earlier round of this plan whose checkpoint it resumes from. The step is named when the round starts, and the resume-from-PASS rule applies then.

specrequiredRoundSpec
reciperequiredRecipe
scanRoundScanRequest | null
cardExperimentCardCreate | null

The experiment card the round is created with, as createRound's card. Required in a campaign whose unattended rounds are on.

startread-onlystring

one of at_approval · later

at_approval: created when the plan is approved. later: contingent, or resuming from another plan round.

gateread-onlyCheckpointGateSpec | null

The gate while training, as it will run. It is the recipe's gate, else the campaign task's default (the poster c_matrix for walk/omni).

estimateread-onlyRunEstimate | null

estimateRun's own arithmetic on the recipe (with the spec's iteration cap written in).

est_usdread-onlynumber | null

What the round is expected to cost, where the hardware planner can model the template. It is recommendRun's cost_usd_est, on a priced executor. Null otherwise, and the cap is then the only number.

est_hoursread-onlynumber | null

The planner's expected wall-clock hours (recommendRun's est_hours), where it models the template.

cap_usdread-onlynumber

The most the round can cost: estimate.cost_usd_max (0 on an unpriced executor). Approving the plan pre-approves it.

parent_nameread-onlystring | null

What to call the parent checkpoint's run (its display_name, e.g. laika-omni-c2-700).

variablesread-onlyRoundVariables | null

The one-variable arithmetic, planned when the plan was proposed: the recipe against the parent's resolved config. Null for a round whose parent is not known yet. A plan whose round breaks a rule is rejected before a person sees it.

warningsread-onlyarray of string

What the rules noticed and would not refuse. Examples: a stand round with no push gate, a key that cannot be compared.

stop_rulesread-onlyarray of string

The round's stop rules in words, from its tripwires and its cap (hub-generated).

statusAgentPlanRoundStatus
round_nread-onlyinteger | null

The campaign round it became, once created.

round_idread-onlystring | null
run_idread-onlystring | null

Its training run, once created.

started_atread-onlystring (date-time) | null (date-time)
noteread-onlystring | null

The agent's reading of a contingent condition (quoted), a skip's reason (quoted), or why the hub refused it.

AgentPlanAllowance

object

The plan's compute against the owner's free monthly allowance. Lucen cloud CPU work draws on the allowance. Lucen cloud GPU work has no allowance. Work on the owner's own machine is free.

AgentPlanAllowance fields
FieldTypeDescription
free_usdrequirednumber

What is left this month of the free allowance for Lucen cloud CPU work.

covered_usdrequirednumber

The part of the plan's cap_usd the free allowance covers.

beyond_usdrequirednumber

The rest of cap_usd, which the free allowance does not cover.

gpu_hoursrequirednumber

The most Lucen cloud GPU hours the plan can use, the sum of its GPU rounds' time limits.

needs_confirmationrequiredboolean

True while the plan is proposed and beyond_usd is above zero. Approving it then needs confirm_beyond_allowance.

sentencerequiredstring

One sentence for the approval card.

AgentDigestLine

object

AgentDigestLine fields
FieldTypeDescription
kindrequiredAgentDigestLineKind
staterequiredAgentItemState
textrequiredstring

One sentence, hub-generated; the agent's words appear only inside quotes.

shortstring | null

length ≤ 90

The same line for a phone, at most 90 characters. It keeps the same facts and drops the identifiers, the quotes and the subordinate clauses. See "The digest's short form" in the API guide. For example, "R4 finished 11:06 — 1,600 it in 29 min, $1.60." The hub generates it, like text. The agent does not write it.

atstring (date-time) | null (date-time)
linksAgentLinks | null

AgentObjectGroupItems

object

AgentObjectGroupItems fields
FieldTypeDescription
grouprequiredAgentObjectGroup
itemsrequiredarray of AgentObject

TaskKind

string

one of session · robot_plan

session: the agent trains and tests policies (an agent session). robot_plan: the agent works on one of your connected robots (a plan). A person approves each time a policy runs on it.

TaskStage

string

one of planning · awaiting_approval · training · testing_in_sim · ready_for_review · deploy_pending_approval · deployed · failed · stopped

Where a task is, derived on read. planning: the agent is working out what to do. awaiting_approval: a plan or a spend waits for a person. training: a training run is queued or running. testing_in_sim: a sim test is queued or running. ready_for_review: results are in for a person to read. Examples are passing checkpoints, a shortlist to pick, or the agent's answer. deploy_pending_approval: a request to run a policy on a robot waits for a person. deployed: a person approved it, and the robot runs it or ran it. failed: the task stopped on an error. stopped: a person stopped it.

TaskStageReached

object

A stage the task has reached, and when it first did.

TaskStageReached fields
FieldTypeDescription
stagerequiredTaskStage
atrequiredstring (date-time)

TaskDevice

object

TaskDevice fields
FieldTypeDescription
idstring | null
namerequiredstring

TaskRun

object

A training run the task started.

TaskRun fields
FieldTypeDescription
idrequiredId
namerequiredstring

The run's name as its page shows it.

statusrequiredJobStatus
executorstring | null
cost_usdnumber | null

What the run has cost so far, where it is billed.

TaskEvidence

object

One sim test the task produced, newest first.

TaskEvidence fields
FieldTypeDescription
rollout_idrequiredId
run_idstring | null

The training run whose policy it tests, when there is one.

modelrequiredstring

owner/slug of the policy tested.

checkpoint_stepinteger | null

The checkpoint tested; null for the policy itself.

purposerequiredstring

one of manual · gate · scan · render

manual: the agent asked for it. gate: a test while training. scan: a test of many seeds. render: videos only.

statusrequiredJobStatus
gates_passedinteger | null
gates_totalinteger | null
verdictstring | null

one of pass · fail

pass when every test passed, fail when one did not; null until it is scored.

has_videorequiredboolean

True when the sim test recorded video.

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

TaskDeployRequest

object

A request the task made to run a policy on a robot, and what came of it.

TaskDeployRequest fields
FieldTypeDescription
request_idrequiredId
statusrequiredstring

one of pending · approved · denied

pending until a person decides, then approved or denied.

device_idrequiredstring | null
device_namerequiredstring
modelrequiredstring

owner/slug of the policy.

approval_idstring | null
approval_statusstring | null

one of issued · running · stopped · refused · installed

Once approved: issued. Then running when the robot started it, stopped when it ended, or refused when the robot refused it. An install approval ends installed once the robot has the file.

created_atrequiredstring (date-time)
started_atstring (date-time) | null (date-time)

AgentGpuRun

object

AgentGpuRun fields
FieldTypeDescription
run_idrequiredId
statusrequiredJobStatus
executorstring | null
cost_usdrequirednumber
liverequiredboolean

True while the run is running and its cost is still accruing.

pricedrequiredboolean

AgentSandboxState

string

one of none · running · snapshotted · terminated · unavailable

  • none: never started.
  • running: a Modal Sandbox is up and billed.
  • snapshotted: idle. Its filesystem is snapshotted and the container stopped. It is not billed, and the next shell call restores it.
  • terminated: ended with the session.
  • unavailable: the deployment configures no sandbox (AGENT_SANDBOX_APP), so the agent has no shell.

AgentPlanRoundStatus

string

one of planned · created · refused · not_needed

  • planned: not started. It starts at approval, or later by key when it is contingent or resumes from another plan round.
  • created: its round (with a campaign) or run (without) exists: round_n, run_id.
  • refused: the hub refused to create it. note carries why. The plan's approval failed with it.
  • not_needed: a contingent round the agent skipped, with its reason quoted in note.

AgentDigestLineKind

string

one of plan · run_finished · run_failed · gates · round · tripwire · render · handoff · needs_you

AgentItemState

string

one of needs_you · running · done · failed · skipped

How a digest line or an object row reads. Each state has a word, a shape and a colour: needs_you (◆), running (■), done (●), failed (✕), skipped (○).

AgentObjectGroup

string

one of needs_you · running · ready_for_review · done

AgentObject

object

AgentObject fields
FieldTypeDescription
kindrequiredAgentObjectKind
idrequiredstring

The object's id (a checkpoint's is <run_id>:<step>, a plan round's <plan_id>:<key>).

grouprequiredAgentObjectGroup
namerequiredstring

E.g. "R4 c4r4_side_ff", "step_1600", "Render video".

linerequiredstring

One line of facts, e.g. "9 / 13 · vx+0.30 93 % · video ready".

staterequiredAgentItemState
wordstring | null

The state as a word for the row (Succeeded, rendering, pending, not needed).

sincestring (date-time) | null (date-time)
linksAgentLinks | null

AgentObjectKind

string

one of decision · run · render · scan · checkpoint · plan_round · request · approval

What a row is. approval: a spend an older session held the old way (an AgentApproval with no decision card). It is listed under Needs you while it is pending. Its id is the approval's, and it is answered through resolveAgentApproval.