Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
OpenShell is a managed sandbox backend for OpenClaw. Instead of running Docker containers locally, OpenClaw delegates sandbox lifecycle to the
openshellThe OpenShell plugin reuses the same core SSH transport and remote filesystem bridge as the generic SSH backend. It adds OpenShell-specific lifecycle (
sandbox create/get/deletesandbox ssh-configmirroropenshellPATHplugins.entries.openshell.config.commandjson5{ agents: { defaults: { sandbox: { mode: "all", backend: "openshell", scope: "session", workspaceAccess: "rw", }, }, }, plugins: { entries: { openshell: { enabled: true, config: { from: "openclaw", mode: "remote", }, }, }, }, }
Restart the Gateway. On the next agent turn, OpenClaw creates an OpenShell sandbox and routes tool execution through it.
Verify:
bashopenclaw sandbox list openclaw sandbox explain
This is the most important decision when using OpenShell.
mirrorUse
plugins.entries.openshell.config.mode: "mirror"Behavior:
execexecBest for:
Tradeoff: extra sync cost before and after each exec.
remoteUse
plugins.entries.openshell.config.mode: "remote"Behavior:
execreadwriteeditapply_patchBest for:
text mirror | text remote | |
|---|---|---|
| Canonical workspace | Local host | Remote OpenShell |
| Sync direction | Bidirectional (each exec) | One-time seed |
| Per-turn overhead | Higher (upload + download) | Lower (direct remote ops) |
| Local edits visible? | Yes, on next exec | No, until recreate |
| Best for | Development workflows | Long-running agents, CI |
All OpenShell config lives under
plugins.entries.openshell.config| Key | Type | Default | Description |
|---|---|---|---|
text mode | text "mirror"text "remote" | text "mirror" | Workspace sync mode |
text command | text string | text "openshell" | Path or name of the text openshell |
text from | text string | text "openclaw" | Sandbox source for first-time create |
text gateway | text string | — | OpenShell gateway name ( text --gateway |
text gatewayEndpoint | text string | — | OpenShell gateway endpoint URL ( text --gateway-endpoint |
text policy | text string | — | OpenShell policy ID for sandbox creation |
text providers | text string[] | text [] | Provider names to attach when sandbox is created |
text gpu | text boolean | text false | Request GPU resources |
text autoProviders | text boolean | text true | Pass text --auto-providers |
text remoteWorkspaceDir | text string | text "/sandbox" | Primary writable workspace inside the sandbox |
text remoteAgentWorkspaceDir | text string | text "/agent" | Agent workspace mount path (for read-only access) |
text timeoutSeconds | text number | text 120 | Timeout for text openshell |
Sandbox-level settings (
modescopeworkspaceAccessagents.defaults.sandboxjson5{ agents: { defaults: { sandbox: { mode: "all", backend: "openshell", }, }, }, plugins: { entries: { openshell: { enabled: true, config: { from: "openclaw", mode: "remote", }, }, }, }, }
json5{ agents: { defaults: { sandbox: { mode: "all", backend: "openshell", scope: "agent", workspaceAccess: "rw", }, }, }, plugins: { entries: { openshell: { enabled: true, config: { from: "openclaw", mode: "mirror", gpu: true, providers: ["openai"], timeoutSeconds: 180, }, }, }, }, }
json5{ agents: { defaults: { sandbox: { mode: "off" }, }, list: [ { id: "researcher", sandbox: { mode: "all", backend: "openshell", scope: "agent", workspaceAccess: "rw", }, }, ], }, plugins: { entries: { openshell: { enabled: true, config: { from: "openclaw", mode: "remote", gateway: "lab", gatewayEndpoint: "https://lab.example", policy: "strict", }, }, }, }, }
OpenShell sandboxes are managed through the normal sandbox CLI:
bash# List all sandbox runtimes (Docker + OpenShell) openclaw sandbox list # Inspect effective policy openclaw sandbox explain # Recreate (deletes remote workspace, re-seeds on next use) openclaw sandbox recreate --all
For
remoteFor
mirrorRecreate after changing any of these:
agents.defaults.sandbox.backendplugins.entries.openshell.config.fromplugins.entries.openshell.config.modeplugins.entries.openshell.config.policybashopenclaw sandbox recreate --all
OpenShell pins the workspace root fd and rechecks sandbox identity before each read, so symlink swaps or a remounted workspace cannot redirect reads out of the intended remote workspace.
sandbox.docker.bindssandbox.docker.*openshell sandbox create--from--gateway--policy--providers--gpuopenshell sandbox ssh-config <name>mirrorremoteopenclaw sandbox© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine