NylorunDocsBeta
Runtime APIAgentsDisk versions

Snapshot an Agent's disk

POST
/v1/agents/{agentId}/snapshot

Between turns, a new version of the Agent's disk (/workspace, and a pod's /harness but the engine's own files): files with their modes and modification times, links and empty directories, as a version of the folder artifact the Agent owns. Unchanged files are stored once; an unchanged disk makes no version (unchanged). A stopped pod is started first. 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

Response Body

The version

application/json
  1. response
agentId*string
artifactId*string
version*integer
Range0 < value
format*string
files*integer
Range0 <= value
bytes*integer
Range0 <= value
storedBytes*integer
Range0 <= value
durationMs*integer
Range0 <= value
unchanged*boolean
createdAt*string
import { createClient } from "@nylorun/agents";const client = await createClient();const snapshot = await client.agents.snapshot("users/alice/assistant");
{  "agentId": "string",  "artifactId": "string",  "version": 1,  "format": "string",  "files": 0,  "bytes": 0,  "storedBytes": 0,  "durationMs": 0,  "unchanged": true,  "createdAt": "string"}