NylorunDocsBeta
Runtime APIAgentsDisk versions

Restore a version of an Agent's disk

POST
/v1/agents/{agentId}/restore

Puts disk version version (or latest) back. A virtual Agent's workspace is rewritten at once (done); a pod gets a new volume seeded from the version before any turn (pending, with disk.operation in the view until it ends). The Agent keeps its id, vault and sessions. Refused during a turn or another copy (agent_busy).

Authorization

headerAuthorizationBearer <token>

An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).

Path Parameters

agentId*string

The Agent id, percent-encoded: users%2Falice%2Ftriage for users/alice/triage

Header Parameters

Nylorun-Protocol*string

The protocol version, 18

Nylorun-Subject?string

The person an application key acts for

Nylorun-Scopes?string

The subject's space-separated scopes; required with a subject

Request Body

application/json
  1. body
requestId?string
Length1 <= length
version*|

Response Body

Restored, or being restored

application/json
  1. response
agentId*string
restored*integer
Range0 < value
status*string
Value in"done""pending"
volumeGeneration?integer
Range0 <= value
import { createClient } from "@nylorun/agents";const client = await createClient();await client.agents.restore("users/alice/assistant", "latest");
{  "agentId": "string",  "restored": 1,  "status": "done",  "volumeGeneration": 0}