OpenHands: The Open‑Source Coding Agent Console with 81.5k+ Stars – Why It Stands Out
OpenHands is a self‑hosted coding‑agent console that lets multiple agents run across local machines, Docker, VMs or the cloud, integrates Claude Code, Codex and Gemini via ACP, supports automated workflows, and includes detailed installation and security guidance for safe long‑term use.
Agent Canvas Architecture
Agent Canvas consists of a browser UI and a backend service. Each backend is an Agent Server paired with a workspace. All conversations, LLM settings, and automation tasks are bound to the selected backend; switching backends transfers these configurations.
Supported Backends and Multi‑Agent Management
Backends can run on the local machine, Docker, a VM, internal network machines, or OpenHands Cloud/Enterprise. Multiple agents (e.g., OpenHands built‑in, Claude Code, Codex, Gemini CLI) can be attached via the Agent Client Protocol (ACP).
Agent Client Protocol (ACP)
When an ACP agent is added, the Agent Server launches the external agent as a CLI subprocess and communicates over stdio using JSON‑RPC. The external agent manages its own model, tools, and execution logic; the Canvas handles messaging and result display.
npx -y @agentclientprotocol/claude-agent-acp
npx -y @zed-industries/codex-acp
npx -y @google/gemini-cli --acpAutomation Integration
Canvas supports cron schedules and event‑driven triggers from GitHub, Linear, Slack, or custom webhooks. Pre‑configured workflows include a GitHub PR Review Assistant, a repository monitor, and a Slack channel monitor. Enabling the PR Review Assistant requires granting the backend GitHub permissions for contents, issues, and pull requests; optional read‑only Actions or Checks permissions allow CI visibility. Fine‑grained personal access tokens with repository‑scoped access and expiration are recommended.
Installation and Self‑Hosting
Prerequisites: Node.js ≥ 22.12 and npm (or uv). Install the npm package globally and start the service:
npm install -g @openhands/agent-canvas
agent-canvasThe service listens on http://localhost:8000. Frontend‑only or backend‑only modes are available via agent-canvas --frontend-only and agent-canvas --backend-only. For public access, set a strong random LOCAL_BACKEND_API_KEY and run with --public:
export LOCAL_BACKEND_API_KEY="YOUR_STRONG_SECRET"
agent-canvas --backend-only --publicDocker image (e.g., version 1.1.0) can be run as:
mkdir -p ~/projects ~/.openhands
docker run -it --rm -p 8000:8000 \
-v ~/.openhands:/home/openhands/.openhands \
-v ~/projects:/projects ghcr.io/openhands/agent-canvas:1.1.0Only mount directories required by the agent; avoid mounting the entire home directory or credential stores.
Permission Risks and Mitigations
Agent Server runs with full host filesystem access, can execute shell commands, access networks, and store secrets. Risks include accidental file deletion, committing erroneous code, or leaking secrets via logs. Mitigation measures:
Run agents only within explicit project directories.
When using Docker, mount only necessary directories.
Expose VMs publicly only with --public and a strong LOCAL_BACKEND_API_KEY.
Protect public endpoints with TLS, reverse proxies, VPNs, or OAuth‑protected tunnels.
Use minimal‑scope tokens for GitHub, Slack, Linear and set expiration dates.
Treat .openhands, backend persistence directories, and API keys as sensitive assets.
Source Code Locations
Agent SDK source: OpenHands/software-agent-sdk. Agent Canvas source: OpenHands/agent-canvas. The main repository is https://github.com/OpenHands/OpenHands .
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
JavaGuide
Backend tech guide and AI engineering practice covering fundamentals, databases, distributed systems, high concurrency, system design, plus AI agents and large-model engineering.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
