Skip to main content
The agent reaches the computer’s disk through five file operations. They are deliberately small and explicit — there is no separate upload/download channel and no hidden sync. Scratch work lives here; anything the agent should hand back is promoted to Files with publish_file.
This page is the canonical sandbox file API. The fs/* routes below (fs/write, fs/read, fs/list, fs/mkdir, fs/remove) are the single source of truth for reading and writing a computer’s disk. Sandbox scratch files are distinct from persistent, org-scoped Files — the latter are what an agent publishes to keep beyond a run.
File operations on a sleeping computer wake it automatically. On a parked computer they are rejected — resume it first. See lifecycle.
These five operations are confined to the computer’s home directory — the home reported by inspect, which the examples below write as /home/user. Read that value rather than assuming a path. Anything outside it (/, /etc, /var) is refused by the machine; use the shell to reach the rest of the disk.

Binary files

There is no dedicated upload or download operation. To move binary data in or out of the sandbox, use write / read with encoding: "base64".

Working directory

The filesystem operations take absolute paths — they do not carry a working directory. The current directory is a per-exec concern: pass cwd to the bash tool to control where a command runs. Nothing about cwd persists between calls.

Limits at a glance

Operations

Write bytes to a path, creating or overwriting the file.
string
required
Absolute path of the file to write.
string
required
The file contents. Interpreted according to encoding.
string
default:"utf-8"
utf-8 for text, or base64 for binary payloads.
Maximum 4 MiB per file per write. Split larger payloads across multiple writes or generate them in-sandbox with the shell.

Next: shell

Run commands with the bash tool and read the buffered output.