Store the working folder of a local mirror, so its chat can continue in the cloud without the computer [write]

Changed on

Only for a session created with local_mirror, and only by its owner. Body {file_id, name, files}: file_id is a gzipped tar laid out as <name>/… that the owner uploaded to their personal files (POST /files/uploads without a workspace). It is copied into the session's private storage, checked against the upload's size and sha256 (422 environment_mismatch), and replaces the folder stored before; the same folder again is a no-op. The folder may hold secrets: it is never public, and it is restored into /workspace/<name> only in a continuation its owner starts. A file the caller did not upload personally answers 404; a session that is not a mirror 409 not_a_mirror_session, one already continued 409 continued_in_cloud, an archived one 410. Up to 2 GiB (413 archive_too_large). Nothing runs and nothing is billed.

post/sessions/{id}/mirror/environment

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/sessions/{id}/mirror/environment
  • Auth
    HTTP bearer

Path parameters

idstring required

The session id

Request body

file_idstring required
namestring required

The folder's name: 1 to 80 letters, digits, spaces, dots, dashes or underscores

filesinteger required

Response

Stored

sha256string
size_bytesinteger
namestring
filesinteger
staged_atstring date-time

Changes