Skip to main content
Every box has its own isolated filesystem. Upload, write, read, list, and download files inside the box.

API

Upload files

Push local files into the box. Each entry maps a local path to a destination inside the box workspace.
You can upload multiple files in a single call. All uploads run in parallel.

Write files

Create or overwrite a file directly from a string. Useful when you want to inject configuration, scripts, or generated content without a local file.

Read files

Read the contents of a file as a string.

Read part of a file

Pass length to read a bounded byte range instead of the whole file, starting at offset (default 0). This keeps a large log or dataset out of memory when you only need a slice of it. The server rejects a length above 8 MiB.

Inspect a path

Get metadata for a single path without reading it: the entry type, size, last modified time, inode, and an opaque version token. Use version for optimistic concurrency. Read it before a slow operation, then compare it afterwards to detect whether the file changed underneath you. Compare it for equality only, and do not parse it.
By default a symlink is reported as "symlink". Pass follow to resolve it and describe the target instead.

Create directories

Create a directory. Pass parents to create missing parent directories, the way mkdir -p does, and to succeed when the directory already exists.

Move and rename

Move a path to a new location, which is also how you rename it.

Delete files

Remove a file. Removing a directory requires recursive, so a directory is never deleted by accident.

List files

List the entries in a directory. Each entry includes the path, size, type, and last modified timestamp.

Download files

Pull files from the box back to your local machine. Call with no arguments to download the entire workspace, or pass a folder to download a specific file or directory.

Examples

Feed data to an agent

Upload input files, run the agent, then read back the structured result.

Inject config before a run

Write environment-specific configuration into the box, then let the agent use it.

Collect outputs from parallel boxes

Fan out work across multiple boxes, then download each result locally.