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.

sandbox.files.read(path)

Read a file as a UTF-8 string. HTTP API →
body pathstringrequired
Absolute path to the file
Returns: Promise<string>

sandbox.files.readBytes(path)

Read a file as raw bytes.
body pathstringrequired
Absolute path to the file
Returns: Promise<Uint8Array>

sandbox.files.write(path, content)

Write content to a file. HTTP API →
body pathstringrequired
Absolute path for the destination file
body contentstring | Uint8Arrayrequired
File content
Returns: Promise<void>

sandbox.files.list(path?)

List directory contents. HTTP API →
body pathstringdefault: /
Directory path
Returns: Promise<EntryInfo[]>

sandbox.files.makeDir(path)

Create a directory (recursive). HTTP API →
body pathstringrequired
Directory path
Returns: Promise<void>

sandbox.files.remove(path)

Delete a file or directory. HTTP API →
body pathstringrequired
Path to remove
Returns: Promise<void>

sandbox.files.readStream(path)

Stream a file as a ReadableStream. Avoids buffering the entire file in memory — ideal for large files (50MB+).
body pathstringrequired
Absolute path to the file
Returns: Promise<ReadableStream<Uint8Array>>

sandbox.files.writeStream(path, stream)

Stream content to a file. Accepts a ReadableStream or Uint8Array without buffering an extra copy in memory.
body pathstringrequired
Absolute path for the destination file
body streamReadableStream<Uint8Array> | Uint8Arrayrequired
File content as a stream or byte array
Returns: Promise<void>

sandbox.files.exists(path)

Check if a path exists. Client-side wrapper — attempts a read and returns false on error.
body pathstringrequired
Path to check
Returns: Promise<boolean>

Types

EntryInfo
typescript
interface EntryInfo { name: string; isDir: boolean; path: string; size: number; }