Sandbox-local storage disappears when a sandbox is destroyed. A mounted workspace is the durable filesystem boundary.
Persistent Storage For Sandbox Agents
For sandbox-backed agents, a workspace is the agent’s persistent filesystem memory. The agent uses its linked sandbox for shell commands and file tools, and the mounted workspace is the part of that filesystem that remains available across runs. The flow is:- Create an organization workspace.
- Create a sandbox with that workspace mounted at
/workspaceor a subpath. - Link an
in_sandboxagent to that sandbox. - The agent reads and writes files under the mount path during its work.
- When the sandbox is paused, resumed, or replaced, the workspace contents remain available for the next run.
Workspace Types
Personal workspaces are useful for private user storage. Use organization workspaces when a sandbox, shared project, or managed agent needs durable storage.
Create A Workspace
Workspace metadata is managed through the control-plane API. Creating a workspace also creates the backing storage root; if storage is unavailable or the organization is over its storage quota, the request fails before the workspace becomes usable.workspaces and a storage summary with used bytes, quota bytes, and whether storage is currently unlimited for the organization.
Mount Into A Sandbox
Mounts are declared when the sandbox is created. Mount paths must be/workspace or a subpath under /workspace.
/workspace are still there.
File Operations
Workspace file endpoints use the storage service. They accept the same API-key or bearer-token auth style, and require thefiles:read or files:write scopes shown below.
/files route family. Mutating operations are path-safe: names cannot escape the workspace root, and large batch operations are bounded.
Delete Safety
Workspace deletion is soft-delete at the metadata layer and best-effort cleanup at the storage layer. Personal workspaces cannot be deleted through the workspace delete API. Before deleting an organization workspace, RunTools checks whether active sandboxes, installable agents, or custom agents still reference it:DELETE /v1/workspaces/:id returns 409 WORKSPACE_IN_USE with a usage summary. Pass ?force=true only after you have intentionally detached or accepted the affected references.
Permissions
Organization admins can use broader organization views where supported. Members only see workspaces allowed by their resource access.
Best Practices
Use workspaces for durable project files
Use workspaces for durable project files
Treat sandbox-local files as disposable unless they are written into a mounted workspace.
Mount at predictable paths
Mount at predictable paths
Use
/workspace for the main project tree, or /workspace/data, /workspace/cache, and similar subpaths when a sandbox needs multiple mounts.Next Steps
Workspaces API
Create, list, rename, delete, and inspect workspace references.
Workspace Files API
List directories, upload files, download files, and mutate workspace contents.