← All posts

AI

OpenHands: A Self-Hosted Autonomous AI Software Engineer

OpenHands is an open platform of AI agents that write code, run commands, and browse the web to finish real dev tasks.

O AI

Autocomplete helps you type; an agent tries to finish the task. OpenHands (formerly OpenDevin) is an open platform for exactly that second thing: AI agents that operate a real development environment - writing and editing files, running shell commands, executing code, and browsing the web - to complete a task you hand them, from a bug fix to a small feature. It's MIT-licensed and designed to run on your own infrastructure inside a sandbox.

What the Agent Can Actually Do

The core idea is that the agent gets a sandboxed computer, not just a text box. It can create a file, run the test suite, read the failure, edit the code, and try again - the loop a human developer runs, automated. It can open a browser to read docs or reproduce a web issue, and it integrates with GitHub to work against issues and open pull requests.

Running It Locally in Docker

OpenHands ships as a Docker image, and the quickstart brings up a web UI where you talk to the agent and watch it work:

# OpenHands runs in Docker; the agent's actions happen in a sandbox. # Check the docs for the current image tag and required env vars. docker run -it --rm --pull=always -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock docker.all-hands.dev/all-hands-ai/openhands

The Sandbox Is the Point

Because an agent that runs arbitrary commands is inherently risky, OpenHands executes the agent's actions inside an isolated runtime container rather than directly on your machine. That boundary is what makes it reasonable to let an agent act at all - you can watch every command it runs and keep it away from your real environment.

Rough Edges and Limitations

  • Autonomy is not reliability. Agents wander, loop, and confidently do the wrong thing. Scope tasks tightly and review everything they produce.
  • It costs tokens fast. An agent that iterates runs many model calls per task; watch the bill on a strong model.
  • Sandbox setup has moving parts. Docker-in-Docker and runtime images mean the first run takes some fiddling.
  • Best on well-scoped work. It shines on contained tasks with clear success criteria, not sprawling open-ended ones.

Treat it as a capable junior that never tires but always needs review, and OpenHands is a genuinely useful way to offload well-defined tasks - and one of the most active open agent platforms to learn the pattern from.

Internal link suggestion: link "AI agents that finish the task" to the Contractor or Orca post, which cover other agent-orchestration approaches.