Snapshot an Agent's disk
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).
AuthorizationBearer <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).
agentId*stringThe Agent id, percent-encoded: users%2Falice%2Ftriage for users/alice/triage
Nylorun-Protocol*stringThe protocol version, 18
Nylorun-Subject?stringThe person an application key acts for
Nylorun-Scopes?stringThe subject's space-separated scopes; required with a subject
The version
application/json- response
agentId*stringartifactId*stringversion*integer0 < valueformat*stringfiles*integer0 <= valuebytes*integer0 <= valuestoredBytes*integer0 <= valuedurationMs*integer0 <= valueunchanged*booleancreatedAt*stringimport { 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"}Delete an Agent's secret DELETE
The next request that would have used it gets none.
Restore a version of an Agent's disk POST
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`).