FolioFolioDocs

Passing files between agents

Folio uses its permission framework and shared-drive architecture to enable safe collaboration across distributed compute. For example, an agent or app may kick off a long-running Blender render or GPU job on a remote sandbox. How does it pass along files?

The simplest approach is to zip and send the files directly to the remote machine, wait for the output, and copy the results back. That is the compute equivalent of coworkers emailing attachments back and forth: it duplicates gigabytes, breaks relative asset paths, loses version history, and creates stale copies.

Instead, Folio passes a scoped reference to the shared drive: a short-lived mount URL and scoped token that lets the remote agent, renderer, or sandbox mount the workspace over HTTPS directly, read what it needs in place, and write outputs straight back as versions on the active branch.

Two ways to give a remote sandbox its files. Copying files, like attachments in email: an agent or app uploads scene.blend and its textures, then downloads still.png and uploads it again; gigabytes are copied, relative paths break and version history is lost. A scoped reference on Folio: Agent A passes a scoped reference and the remote renderer mounts the branch scene-pass itself; it reads in place, relative paths stay intact and outputs are saved as versionsTwo ways to give a remote sandbox its files. Copying files, like attachments in email: an agent or app uploads scene.blend and its textures, then downloads still.png and uploads it again; gigabytes are copied, relative paths break and version history is lost. A scoped reference on Folio: Agent A passes a scoped reference and the remote renderer mounts the branch scene-pass itself; it reads in place, relative paths stay intact and outputs are saved as versions

How remote renderers and sandboxes mount the drive

Because storage and compute are separated, a remote machine does not need a local copy of the workspace or any broad account credentials. Folio hands the remote runtime a protected mount context (a private 0600 context file referenced by PLANAR_MOUNT_CONTEXT_FILE) containing three things:

  • A dedicated HTTPS mount URL bound to the session or job attempt (for example /dav/compute/...).
  • A short-lived, scoped mount token (never your sign-in cookie, never a workspace admin key, and never cloud-storage credentials).
  • The exact branch ref the work belongs to (main or a branch such as scene-pass).

The remote container mounts that URL directly as a normal folder (via rclone / FUSE). Tools like Blender, ffmpeg, or another agent open files right off the mount, preserve relative texture and asset links automatically, and write results straight to the destination path.

A remote renderer's mount in four steps. 1: an agent or app submits the job on the branch scene-pass. 2: Folio mints a mount for this attempt, with the URL /dav/compute/app_<attemptId>/, a short-lived token, the branch scene-pass and a write scope of cut_01/stills/still.png only. 3: the remote renderer mounts it and runs; a read of scene.blend and textures is OK, a write of stills/still.png is OK and makes a new version, a write of another file gets 403 forbidden. 4: the job finishes, expires or is cancelled and Folio revokes the token; a late write gets 403 attemptFenced, and still.png v2 is on scene-passA remote renderer's mount in four steps. 1: an agent or app submits the job on the branch scene-pass. 2: Folio mints a mount for this attempt, with the URL /dav/compute/app_<attemptId>/, a short-lived token, the branch scene-pass and a write scope of cut_01/stills/still.png only. 3: the remote renderer mounts it and runs; a read of scene.blend and textures is OK, a write of stills/still.png is OK and makes a new version, a write of another file gets 403 forbidden. 4: the job finishes, expires or is cancelled and Folio revokes the token; a late write gets 403 attemptFenced, and still.png v2 is on scene-pass

Lifetime, revocation, and enforcement

Scoped references are enforced by the Folio gateway on every request, not trusted to the remote sandbox:

  • Write-scoped by path: On a remote worker Attempt mount (mountWorkspace: true in manifest.json), the server allows writes only to the job's declared output paths (plus safe editor save-temp files such as Blender's <output>@). Any write, move, or delete outside those paths returns 403 forbidden.
  • Automatic revocation: The mount token lives only as long as the attempt or session. The moment a job finishes, times out, or is cancelled, Folio revokes the token and fences the attempt so a runaway or cancelled remote container cannot publish late changes (403 attemptFenced).
  • Branch-isolated: Every write lands on the branch the job or session was bound to, never directly altering main unless the caller explicitly ran on main or later merged the branch.

Today vs in alpha

Available today (write-scoped remote mounts & session mount contexts): Remote app workers with mountWorkspace: true receive write-scoped Attempt mounts enforced to their declared output paths, and agent sessions receive a protected mount context (PLANAR_MOUNT_CONTEXT_FILE) so remote renderers (such as Blender on Modal) can mount the session's branch over HTTPS without copying files or exposing account keys.

See Agent sessions for how cloud compute attaches to the drive and App permissions for how manifest boundaries work.