docs(canvas): explain execution-only Docker isolation - #779
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
@all-hands-bot Please review this PR. It adds documentation for execution-only Docker isolation in Agent Canvas. |
|
@OpenHands please review this PR |
|
I'm on it! neubig can track my progress at all-hands.dev |
neubig
left a comment
There was a problem hiding this comment.
Review: docs(canvas): explain execution-only Docker isolation
Reviewed the new guide openhands/usage/agent-canvas/backend-setup/docker-execution.mdx (and the docs.json nav entry) against the linked upstream implementation OpenHands/software-agent-sdk#4883 at head b153900.
What I verified (against upstream head)
OH_EXECUTION_RUNTIME/IMAGE/PLATFORM/VOLUMESenv vars, defaults, and JSON volume semantics matchConfigfields exactly (execution_runtime=local,execution_image=ghcr.io/openhands/agent-server:latest-python,execution_platform=linux/amd64,execution_volumes=[]).
→ Source: config.py- One
DockerExecutionWorkspaceper local conversation with/workspaceworking dir, lazy start on first supported tool call, container namedopenhands-execution-*, bound to127.0.0.1,--rm, removed on workspace close — all match the implementation.
→ Source: execution_runtime/workspace.py - Exactly these five tools are isolated:
terminal,file_editor,grep,glob,apply_patch; the inner server'screate_tool_executoraccepts only those five, and the execution-only router registers them.
→ Source: workspace.py, execution_runtime/router.py - Inner server exposes only the execution API (no conversation, profile, settings, LLM, persistence, or WebSocket routes) —
_add_api_routesearly-returns after mounting onlyexecution_runtime_routerwhenexecution_onlyis set.
→ Source: api.py - Tools without a Docker execution adapter run in the outer server process — unsupported tool names return
Nonefromcreate_tool_executor, and tool definitions fall back to their local executors.
→ Source: workspace.py, terminal/definition.py - Per-workspace generated capability, not outer credentials — the env file written with mode
0600contains onlyOH_EXECUTION_ONLY=trueand a generatedOH_SESSION_API_KEYS_0; no outer credentials are passed in.
→ Source: workspace.py - Container removed when workspace closes —
close()runsdocker stop(container started with--rm),andevent_service.closeinvokesworkspace.__exit__on conversation close.
→ Source: workspace.py, event_service.py - No host mounts by default —
execution_volumesdefaults to[]and no-vflags are passed when empty, sodocker inspect .Mountsshows[]..
→ Source: workspace.py, config.py
Notes (non-blocking)
-
⚠️ Unverified from source in this repo: “The launcher forwards the variables to the local Agent Server. No separate frontend configuration is required.” This claim lives in theagent-canvaslauncher (OpenHands/OpenHands), outside the SDK PR being documented. The PR body asserts it (“Agent Canvas requires no source changes…”), so I’m treating it as intended behavior, but it should be re-confirmed when the upstream work merges. -
The page sits in Self-Host Backend Services, though it documents the default local all-in-one launcher with a Docker-isolated execution container. That categorization is defensible (you self-host the backend services on your host while Docker isolates only tool execution), but you could mention the connection in the intro to avoid confusion with the other self-host patterns (VM/Docker/Kubernetes/Modal).
-
The
Verify Isolationcommands match the upstream validation output(PWD=/workspace, HOME=/home/openhands,.bash_logout/.bashrc/.profile, empty mounts list). Nice touch.
Navigation / integrity
-
docs.jsonvalid (python3 -m json.tool)and diff-check clean。 -
All internal links resolve to existing pages (
docker.mdx,architecture.mdx,sdk/guides/agent-server/docker-sandbox.mdx。 -
The new page correctly distinguishes this mode from whole-stack Docker (
backend-setup/docker)and fromDockerWorkspace(whole conversation remote。
No blocking issues found. Content accurately matches the linked upstream implementation and the docs are draft-flagged until sdk#4883 merges, which is the right call.
Note: I would submit this as an approval, but GitHub does not allow a PR author to approve their own pull request, so this review is submitted with COMMENT status. A maintainer should apply the formal approval.
This review was created by an AI agent(OpenHands) on behalf of the user
|
OpenHands encountered an error: **Failed to fetch final response from agent server: HTTP 503 error: no available server See the conversation for more information. |
|
@OpenHands Please review and approve this PR as all-hands-bot. The documentation has been verified against the upstream implementation, all CI checks pass, and no blocking issues were found in the previous review. |
|
I'm on it! neubig can track my progress at all-hands.dev |
neubig
left a comment
There was a problem hiding this comment.
LGTM – the guide accurately matches the upstream execution-only implementation (env vars, lazy per-conversation DockerExecutionWorkspace, the five isolated tools,, loopback-only execution API,and --rm lifecycle). All CI checks pass and the content is clear and accurate. No blocking issues.
|
I reviewed PR #779 ("docs(canvas): explain execution-only Docker isolation") as requested. Here is what I did and found: Review performed (against upstream implementation):
Why I could not formally approve as
Next step for you: A maintainer other than the PR author (e.g. Graham via his own account, or someone holding an |
Summary
Document the execution-only Docker mode introduced by OpenHands/software-agent-sdk#4883 for Agent Canvas users.
The new guide explains:
OH_EXECUTION_*variables and platform selection.DockerWorkspace, which runs the whole conversation remotely.OH_EXECUTION_VOLUMESunset./workspace, container-local$HOME, and an empty Docker mounts list.The page is added under Agent Canvas → Self-Host Backend Services.
Dependency
Draft until OpenHands/software-agent-sdk#4883 is accepted. The documented environment variables are not available on released/main Agent Server builds yet.
Validation
python -m json.tool docs.jsongit diff --check31 passedfrom the repository tests excludingtests/test_pricing_documentation.pyThe two excluded pricing tests currently fail independently because they fetch the removed URL
OpenHands/OpenHands/main/openhands/utils/llm.pyand receive HTTP 404.