Skip to main content
Sandboxes are disposable; workspaces are what survives. A workspace is org-owned persistent storage you can mount into a sandbox like a filesystem, browse from the dashboard, and hand to an agent as memory that outlives any single run. Threads remember the conversation — workspaces remember the files. A workspace can be: 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:
  1. Create an organization workspace.
  2. Create a sandbox with that workspace mounted at /workspace or a subpath.
  3. Link an in_sandbox agent to that sandbox.
  4. The agent reads and writes files under the mount path during its work.
  5. When the sandbox is paused, resumed, or replaced, the workspace contents remain available for the next run.
This is the right place for repo checkouts, long-running task notes, generated files, caches you want to keep, and agent-maintained project state. Conversation threads preserve chat history; workspaces preserve files.

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.
List workspaces:
The list response includes both 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.
Once mounted, the workspace appears inside the sandbox at the requested path. Personal workspaces are intentionally rejected by the mount resolver. Any sandbox-backed agent attached to that sandbox can use its file tools against the same path:
If you destroy the sandbox and later create a new sandbox with the same workspace mounted, the files under /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 the files:read or files:write scopes shown below.
List a directory:
Upload a file:
Download a file:
Uploads are limited to 100 MB by default. If the organization has exceeded its storage quota, write operations return a quota error and the workspace becomes read-only until usage is reduced or credits are added. Rename, move, copy, and delete operations are exposed through the same /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:
If the workspace is still referenced, 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

Treat sandbox-local files as disposable unless they are written into a mounted workspace.
Use /workspace for the main project tree, or /workspace/data, /workspace/cache, and similar subpaths when a sandbox needs multiple mounts.
Personal workspaces are owner/admin scoped and are intentionally not mounted into sandboxes.

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.