Workspaces
A workspace is a named directory that an agent can access. A workdir is the current working directory within a workspace.
Workspaces provide a consistent way to access files across different sandboxes.
Paths and directories
Each workspace has a name and a root directory. For example, a workspace named repo can point to a project directory:
repo://
repo://src
repo://src/main.pyThese logical paths refer to the same files regardless of whether the agent runs on the host or inside a Docker container.
Tools can also use relative paths based on the current workdir. Changing the workdir does not change which directories the agent can access.
Lab workspace
Every agent has a default workspace named lab, managed by Toolang.
You can grant access to additional directories through configuration or command-line options. Temporary grants are not saved in configuration. Their lifetime depends on how the runtime starts.
Workspace grants are inherited by child runs, allowing them to access the same directories without additional configuration.
Access and isolation
Workspaces define directory access for workspace-aware tools. Path resolution prevents traversal or symlinks from escaping granted directories.
Workspace grants do not provide operating system isolation. Shell commands still run with the permissions of the underlying process, while Docker sandboxes can provide an additional isolation boundary.
Attaching a file using @file passes its contents as input without granting access to its containing directory.
See Manage workspaces for configuring workspaces and changing the current workdir.