Overview
OpenHands is an open-source platform for AI-driven software development. Instead of only suggesting code, an OpenHands agent works like a developer: it reads your repository, edits files, runs shell commands, and tests its own changes until the task is done. You can point it at Claude, GPT, or another large language model of your choice.
It comes in several layers that share the same engine. The Software Agent SDK is a Python library you can use to define and run agents in code. The CLI is the quickest way to get started from a terminal and feels similar to tools like Claude Code or Codex. The Local GUI runs agents on your own machine with a REST API and a single-page React app, and there is also a hosted Cloud option. The core code is released under the MIT license.
Because the agent can run and verify code, it is built for real engineering work such as fixing bugs, adding features, and writing tests, rather than just autocompleting lines.
What it does
- Agentic development loop: the agent reads code, edits files, runs commands, and tests its work instead of only giving suggestions
- Model-agnostic: works with Claude, GPT, or any other supported LLM you configure
- Multiple interfaces from one engine: a terminal CLI, a local web GUI with REST API, and a composable Python SDK
- Headless mode for CI pipelines and automation, with optional JSON output for parsing
- Model Context Protocol (MCP) support to extend the agent with external tool servers
- Confirmation modes that range from approving every action to fully auto-approving (yolo) or using an LLM-based security analyzer
Getting started
The CLI is the easiest way to start. Install it with uv, then run it once to set up your LLM, and give it a task.
Install the CLI with uv
The recommended way to install the OpenHands CLI is as a uv tool, pinned to Python 3.12.
uv tool install openhands --python 3.12Run it and configure your LLM
The first time you run the CLI it guides you through configuring your LLM settings. Configuration is stored under ~/.openhands/. Run the agent interactively in your terminal:
openhandsRun a task headlessly
For CI, scripts, and automation, run a task without the interactive UI by passing it directly. Add --json if you need machine-readable output.
openhands --headless -t "Write unit tests for auth.py"Launch the local web GUI (optional)
If you prefer a browser-based experience similar to Devin or Jules, start the full web GUI server.
openhands serveCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Fixing bugs and adding features in an existing repository, letting the agent edit, run, and test the code until it works
- Generating and running unit tests for a file or module
- Automating coding tasks inside CI/CD pipelines using headless mode with JSON output
- Building custom autonomous coding agents in Python with the Software Agent SDK
- Extending the agent with external tools through MCP servers
How OpenHands compares
OpenHands alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| opencode | ★ 176k | OpenCode is an open source AI coding agent that runs in your terminal, with built-in build and plan agents and an optional desktop app. |
| Gemini CLI | ★ 105k | An open-source command-line AI agent from Google that connects your terminal to Gemini models for reading code, editing files, running shell commands, and searching the web. |
| OpenHands | ★ 77.8k | Open-source AI coding agent that writes, runs, edits, and tests code with any LLM |
| Goose | ★ 49.8k | Goose is an open-source AI agent that runs on your machine for code, research, automation, and more, with a desktop app, CLI, and API built in Rust. |
| Continue | ★ 34.1k | Continue is an open-source coding agent available as a CLI, VS Code extension, and JetBrains plugin, plus version-controlled AI checks that run on pull requests in CI. |
| Vibe Kanban | ★ 27.1k | Vibe Kanban lets you plan tasks on a kanban board, run coding agents like Claude Code and Codex in isolated workspaces, then review their diffs and ship pull requests. |
| Serena | ★ 25.6k | Serena is an open-source MCP toolkit that gives any LLM coding agent symbol-level code retrieval, editing, and refactoring across 40+ languages. |
| Crush | ★ 25.5k | Crush is a terminal coding agent from Charm. It connects your code, tools, and workflows to any OpenAI- or Anthropic-compatible LLM, with LSP context and MCP plugins. |