Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Filesystem

Accessed via sandbox.files.

await sandbox.files.read(path)

Read a file as a UTF-8 string. HTTP API →
body pathstrrequired
Absolute path to the file
Returns: str

await sandbox.files.read_bytes(path)

Read a file as raw bytes.
body pathstrrequired
Absolute path to the file
Returns: bytes

await sandbox.files.write(path, content)

Write content to a file. HTTP API →
body pathstrrequired
Absolute path for the destination file
body contentstr | bytesrequired
File content
Returns: None

await sandbox.files.list(path="/")

List directory contents. HTTP API →
body pathstrdefault: /
Directory path
Returns: list[EntryInfo]

await sandbox.files.make_dir(path)

Create a directory. HTTP API →
body pathstrrequired
Directory path
Returns: None

await sandbox.files.remove(path)

Delete a file or directory. HTTP API →
body pathstrrequired
Path to remove
Returns: None

await sandbox.files.exists(path)

Check if a path exists. Client-side wrapper — attempts a read and returns False on error.
body pathstrrequired
Path to check
Returns: bool

await sandbox.files.read_stream(path)

Stream a file as async byte chunks. Avoids buffering the full file in memory — ideal for large files (50MB+).
body pathstrrequired
Absolute path to the file
Returns: AsyncIterator[bytes]

await sandbox.files.write_stream(path, stream)

Stream content to a file from an async iterator. Avoids buffering the full file in memory.
body pathstrrequired
Absolute path for the destination file
body streamAsyncIterator[bytes]required
Async iterator yielding byte chunks
Returns: None

Types

EntryInfo
python
@dataclass class EntryInfo: name: str is_dir: bool path: str size: int = 0