/workspace is the default mutable work tree for agent and repo-style flows.
General filesystem APIs also accept valid sandbox-scoped absolute paths such as
/tmp/result.txt, /data/model.bin, /context/input.json, and
/srv/app/config.json.
Avoid writing to Nullspace runtime-managed paths under /workspace/.nullspace;
they are reserved for sandbox control metadata and transfer state.
Quick Example
Choose A File Operation
| Need | Use |
|---|---|
| Write small in-memory content | sandbox.files.write(...) or write_files(...) |
| Read text or bytes | sandbox.files.read(..., format="text") or format="bytes" |
| Inspect paths | list(), info(), and exists() |
| Move, create, chmod, or remove | rename(), make_dir(), set_permissions(), and remove() |
| Upload local files or directories | Uploads |
| Download files, directories, or signed URLs | Downloads |
| Find or replace content | Search and watch |
Inspect And Mutate
depth=0 for the immediate directory only or a larger depth to include
nested paths.
Batch Write
write_files() is best for small in-memory files. For larger local files,
directories, resumable transfers, or progress events, use
upload_file() and upload_dir().