A reasoning loop
A provider-agnostic LLM interface drives an agent that plans, acts, observes the result, and iterates. Every step is a typed event you can replay, log, or hook into.
Open source · AI-driven development
OpenHands is an open-source project for running AI software-development agents. You give it a task in plain language; it reads your code, runs shell commands, edits files, browses the web, runs tests, and opens pull requests — inside a sandbox it can't escape.
This page is a plain-English map of what OpenHands is, how the pieces fit together, and how to run it. It was written and deployed by an OpenHands agent — the thing it describes.
01 — The idea
Not a chat window that suggests code, and not autocomplete. OpenHands is an agent: a reasoning loop with hands. The model decides what to do, a tool does it in a real environment, and the result goes back into the model's context — over and over, until the task is done or it needs you.
A provider-agnostic LLM interface drives an agent that plans, acts, observes the result, and iterates. Every step is a typed event you can replay, log, or hook into.
Bash, file editing, browsing, terminal interaction, custom tools, and anything an MCP server exposes. The agent doesn't describe the change — it makes it.
Execution happens in a sandbox — Docker, a local process, or a remote machine — scoped to one repository or folder. The blast radius is the workspace you handed it.
OpenHands gives a capable LLM a sandbox, a terminal, a file editor and a browser, then lets it work a ticket end-to-end while you watch, steer, and review the diff.
02 — The shape of it
The mental model that makes everything else click: the UI is separate from the backend that runs the agent. They talk over HTTP and WebSocket, so they can live on entirely different machines.
03 — Five ways in
OpenHands ships as a product family rather than a single app. They share the same engine; they differ in who runs it and who it's for.
The open-source browser client and control centre. Conversations, files, terminals, model
configuration, backends and automations in one place. It connects to one or more Agent
Server backends, and the agent-canvas launcher runs client + backend as an
all-in-one stack — npm or Docker gets you going in minutes.
A composable Python library for building agents that work with code. Configure an LLM, pick or write an agent, give it tools, start a conversation. The same repository ships Agent Server, which exposes execution, conversations, tools and workspaces over REST and WebSocket.
The hosted commercial service at app.all-hands.dev. No infrastructure to run:
hosted execution, GitHub / GitLab / Bitbucket and Slack integrations, collaboration,
access controls, usage reporting and budget management. Sign in with your Git provider and
start.
Commercial capabilities and support for organisations that need licensed self-hosting or managed deployment. Helm charts for Kubernetes, VM installs, SAML SSO, external Postgres, custom sandbox images, warm runtime pools and observability integrations.
The community-supported standalone API and sandbox control plane. Its job is narrow and useful: create and manage sandboxed environments where agents can safely work.
The earlier generation: a single-container local GUI and a terminal openhands
command. Still documented, but the project's direction is Agent Canvas and the SDK.
04 — Under the hood
Tools are the verbs of the system. The SDK ships a default set — BashTool,
FileEditorTool and friends — and you can add your own or import a whole toolkit
over MCP.
Run any shell command: build, test, install, inspect logs, drive git.
Read, create and patch files with real diffs instead of whole-file rewrites.
Navigate the web to read docs, reproduce a bug, or verify a running app.
Drive REPLs and interactive CLIs — not just fire-and-forget commands.
Define typed tools for your own internal systems and APIs.
Discover and use tools from any Model Context Protocol server, automatically.
Break a large job into tracked steps so progress is visible and resumable.
Run independent tool calls concurrently when one response asks for several.
Send a side question mid-run without interrupting the main execution flow.
05 — Making it yours
Out of the box the agent is competent. The interesting part is teaching it your conventions — and doing it once, in a file, instead of in every prompt.
Reusable instructions, domain knowledge and supporting files for the agent. Trigger them by keyword, by path glob (they load automatically whenever a matching file is touched), or apply them globally, per organisation, or per user.
keyword path-triggered org user global
Bundle skills, hooks, MCP servers, agents and commands into one reusable package in the portable Agent Plugins format, so a single package works across every compatible client.
skills hooks MCP agents commands
Event- and schedule-driven runs: react to a webhook, a label, a Slack message or a cron tick. Pre-built automations cover common workflows, and you can sync definitions through Git.
webhooks cron pre-built git-synced
A .openhands directory at the root of your repo tells the agent how to work in
this project — setup commands, conventions and context that should not live in a prompt.
AGENTS.md .openhands/
06 — Hands on
The browser route needs no code. The SDK route is a handful of lines and one API key.
Install Agent Canvas (npm or Docker), open it, point it at a model and start a conversation. Or skip installation entirely and sign in to OpenHands Cloud.
# No install, hosted — the fastest taste of OpenHands
open https://app.all-hands.dev
# Or run Agent Canvas yourself
npm install -g @openhands/agent-canvas
agent-canvas
Install uv, export a key for any LiteLLM-supported provider, and run a real
agent against your current directory.
from openhands.sdk import LLM, Conversation
from openhands.sdk.agent import get_default_agent
llm = LLM(model="anthropic/claude-sonnet-4-5",
api_key=api_key, service_id="agent")
agent = get_default_agent(llm=llm, cli_mode=True)
conversation = Conversation(agent=agent, workspace=cwd)
conversation.send_message(
"Write 3 facts about this project into FACTS.txt.")
conversation.run()
The default agent brings BashTool, FileEditorTool and the rest of the
standard tool set. Swap the model string for any provider LiteLLM supports — or for a local
server such as Ollama, vLLM, LM Studio or SGLang.
07 — Where it earns its keep
The pattern is the same everywhere: a well-scoped, verifiable task with a clear definition of done, in a repository the agent can run.
Triage a CVE report, locate the vulnerable call sites, patch them, and open the PR.
Read a diff with fresh eyes on every pull request and leave actionable comments.
Write and repair tests, then run them until the suite is green.
Correlate logs, form a hypothesis, and check out the commit that broke it.
Bump a library, fix the fallout, run the tests, and report what changed.
Mechanical, high-volume translation work — exactly what an agent is good at.
Two rules of thumb from the docs: give it a task you could describe to a competent new engineer, and make the finish line checkable — a passing test, a clean build, a diff you can review.
08 — Go deeper