Introduction
Modern software development often involves a tedious cycle of writing code, running tests, debugging, and searching documentation. For many developers, the gap between a high-level idea and a working implementation is filled with repetitive toil. OpenHands (formerly known as OpenDevin) is an open-source AI agent framework that transforms this workflow by acting as an autonomous software engineer. With over 72k GitHub stars, it allows AI agents to write code, execute terminal commands, and browse the web, effectively replacing the manual loop of a developer’s daily tasks with an agentic workflow.
What Is OpenHands?
OpenHands is an open-source platform for building and deploying AI software development agents that can interact with a digital environment in a human-like manner. It is developed by All-Hands-AI and released under the permissive MIT License. The platform provides a sandboxed execution environment where agents can safely modify files, run shell commands, and navigate the web to solve complex engineering problems.
Unlike simple chat-based assistants, OpenHands is a full-cycle autonomous agent. It leverages a Python backend and a React frontend, providing multiple interfaces including a local web GUI, a CLI, and a comprehensive SDK for building custom agentic workflows.
Unlike simple chat-based assistants, OpenHands is a full-cycle autonomous agent. It leverages a Python backend and a React frontend, providing multiple interfaces including a local web GUI, a CLI, and a comprehensive SDK for building custom agentic workflows. It is model-agnostic, meaning it can connect to various LLMs via LiteLLM, including Claude 3.5, GPT-4, and locally hosted models.
Why OpenHands Matters
The primary value of OpenHands lies in its ability to move beyond code generation to code execution. Most AI assistants can suggest a snippet of code, but they cannot verify if that code actually works. OpenHands fills this gap by providing a secure sandbox where the agent can iteratively plan, execute, and observe results. This “reasoning-action loop” allows the agent to debug its own errors and refine its implementation until the task is complete.
As the industry shifts toward “vibe coding” and agentic development, OpenHands provides a critical piece of infrastructure: a self-hosted, model-agnostic control center. This ensures that developers maintain control over their data and the specific models they use, avoiding vendor lock-in while benefiting from the capabilities of an autonomous AI engineer.
The project’s rapid growth—evidenced by its massive star count and high contribution rate—shows a strong community demand for tools that can handle the “toil” of la software engineering, such as squashing bugs, implementing features, and updating documentation, without requiring constant human oversight.
Key Features
- Autonomous Code Modification: The agent can read, create, and modify project files directly within the workspace, allowing it to implement entire features or refactor large codebases.
- Sandboxed Terminal Access: Agents run shell commands in a secure Docker-based environment, enabling them to install dependencies, run tests, and verify their own changes.
- Integrated Web Browsing: A built-in browser agent allows the agent to search for documentation, copy code snippets from StackOverflow, and research API specifications in real-time.
- Model-Agnostic Architecture: Through LiteLLM integration, OpenHands supports a vast array of providers including Anthropic, OpenAI, and local models (via Ollama or Lemonade Server), giving users full flexibility over their LLM choice.
- Multi-Agent Collaboration: The framework supports the delegation of tasks between different specialized agents, allowing a “manager” agent to coordinate a “coder” and a “tester” to ensure high-quality output.
- Agent-Client Protocol (ACP): OpenHands implements a standardized protocol for agent communication, allowing it to integrate with other agents like Claude Code or Codex.
- Comprehensive SDK: A modular Python SDK allows developers to build their own custom agents with specific tools and memory management systems.
- Observability and Tracing: Native OpenTelemetry support allows for deep tracing of agent actions, which can be integrated with tools like MLflow to monitor token usage and step-by-step reasoning.
How OpenHands Compares
| Feature | OpenHands | AutoGen | CrewAI |
|---|---|---|---|
| Primary Focus | Autonomous Software Engineering | Multi-Agent Conversation | Role-Based Orchestration |
| Native Sandboxing | Yes (Docker) | Partial/External | No |
| Web Browsing | Yes (Integrated) | Via Plugins | Via Tools |
| Model Flexibility | High (LiteLLM) | High | High |
| Deployment | Self-Hosted / Cloud | Local / SDK | Local / SDK |
OpenHands differs from frameworks like AutoGen or CrewAI primarily in its deep integration with the developer’s environment. While AutoGen focuses on the conversation between agents, OpenHands focuses on the action. It provides the actual shell, the file system, and the browser, which are essential for a software engineer agent to be productive. This makes OpenHands the superior choice for those who want an agent that can actually “get things done” in a codebase rather than just discussing how to do them.
However, for users who need complex, multi-step business process orchestration (e.g., a researcher agent talking to a writer agent to produce a report), CrewAI or AutoGen may be more appropriate. OpenHands is specialized for the software engineering lifecycle: planning, coding, testing, and debugging.
Getting Started: Installation
OpenHands offers several ways to get started, depending on whether you want a quick start or a full development environment.
Docker Installation (Recommended)
The fastest way to run OpenHands is via Docker. This ensures the sandbox is correctly configured.
docker run -it --rm --pull=always \n -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.34-nikolaik \n -e LOG_ALL_EVENTS=true \n -v /var/run/docker.sock:/var/run/docker.sock \n -v ~/.openhands-state:/.openhands-state \n -p 3000:3000 \n --add-host host.docker.internal:host-gateway \n --name openhands-app \n docker.all-hands.dev/all-hands-ai/openhands:0.34
CLI Installation (via uv)
For developers who prefer the terminal, the OpenHands CLI can be installed using uv (requires Python 3.12+).
uv tool install openhands --python 3.12
From Source (For Contributors)
To build OpenHands from source, you will need Python 3.12, Node.js >= 22, Poetry, and Docker Desktop.
- Clone the repository:
git clone https://github.com/All-Hands-AI/OpenHands - Build the environment:
make build - Run the application:
make run
How to Use OpenHands
Once OpenHands is running, the basic workflow involves providing a natural language prompt to the agent. The agent then enters a reasoning-action loop: it plans the task, executes a command, observes the output, and iterates.
For example, if you ask the agent to “Fix the bug in the authentication module where the login fails for users with special characters in their passwords,” the agent will:
- Explore: Search the codebase for the authentication logic.
- Reproduce: Write a failing test case that reproduces the bug.
- Fix: Modify the code to handle special characters.
- Verify: Run the tests again to ensure the bug is fixed and no regressions were introduced.
You can interact with the agent in real-time via the web GUI, watching the agent’s terminal and file changes as they happen. You can also provide feedback or interrupt the agent if it gets stuck, guiding it back on the right track.
Code Examples
For those building custom agents using the OpenHands SDK, the following examples demonstrate how to implement basic agentic behavior.
Basic Agent Initialization
This example shows how to initialize a simple agent that uses a local workspace.
from openhands.version import VERSION
from openhands.core import OpenHandsAgent
agent = OpenHandsAgent(
model="anthropic/claude-3-5-sonnet",
workspace=LocalWorkspace()
)
response = agent.run("Create a simple FastAPI app with a /health check endpoint")
print(response.content)
Implementing a Custom Tool
The SDK allows you to define custom tools that the agent can use to interact with the environment.
from openhands.tools import BaseTool
class MyCustomTool(BaseTool):
def execute(self, input_data):
# Custom logic to interact with the system
return f"Tool executed with {input_data}"
agent.add_tool(MyCustomTool())
Real-World Use Cases
OpenHands shines in scenarios where the agent can operate autonomously over several iterations of the development cycle.
- Bug Squashing: A QA engineer can provide a bug report and a reproduction script. OpenHands can then autonomously find the root cause, implement a fix, and verify it with tests.
- Feature Implementation: A developer can prompt the agent to “Implement a new search filter for the product list page,” and the agent will explore the existing codebase, create the necessary components, and ensure they integrate correctly.
- Legacy Code Migration: An architect can use OpenHands to migrate a codebase from one framework to another (e.g., migrating from Express.js to FastAPI) by having the agent iteratively rewrite and test each module.
- Documentation Updates: A technicians can prompt the agent to “Update the README.md and API documentation based on the current implementation of the authentication module,” and the agent will analyze the code and write the updated docs.
- GitHub Issue Resolution: By integrating with GitHub, OpenHands can be configured to automatically decompose GitHub issues into tasks and resolve them autonomously.
Contributing to OpenHands
OpenHands is a community-driven project and welcomes contributions from developers of all levels. The project maintains a detailed CONTRIBUTING.md and a Code of Conduct to ensure a healthy collaboration environment.
To contribute, you can report bugs via GitHub Issues, submit pull requests for new features, or help improve the documentation. The project encourages the use of the make build and make run targets to set up a local development environment quickly.
Community and Support
OpenHands has a massive and active community. You can find support and share your ideas in the following official channels:
- Discord: The primary hub for real-time chat and community support.
- Slack: Official community Slack for professional and developer discussions.
- GitHub Discussions: For long-form questions and architectural discussions.
- Documentation: The official documentation site at docs.all-hands.dev.
Conclusion
OpenHands is more than just a coding assistant; it is a comprehensive platform for autonomous AI software engineering. By integrating a secure sandbox, a model-agnostic architecture, and a powerful SDK, it allows developers to move from simple code generation to full-cycle autonomous development.
If you are looking to reduce the toil of repetitive coding tasks, automate your bug fixes, or build your own custom AI agents, you’ll find that OpenHands is the right choice. While it still requires human oversight to ensure quality and security, the productivity gains are immense.
Star the repo, try the quickstart, and join the community to experience the future of agentic development.
What is OpenHands and what problem does it solve?
OpenHands is an open-source AI software engineer that automates the software development lifecycle. It solves the problem of repetitive coding toil by allowing an AI agent to autonomously write code, run tests, and debug errors in a secure sandbox.
How do I install OpenHands?
The easiest way to install OpenHands is using Docker. You can run a single command to pull the image and start the application, which provides the web GUI and the sandboxed environment.
How does OpenHands compare to GitHub Copilot?
While Copilot is an autocomplete tool that suggests code, OpenHands is an autonomous agent. It can plan a task, execute commands in a terminal, and browse the web to solve a problem, whereas Copilot primarily provides text suggestions within the IDE.
Can I use OpenHands with local LLMs?
Yes, OpenHands is model-agnostic and supports local models via providers like Ollama or Lemonade Server, allowing you to run your AI engineer entirely on your own hardware for privacy and data control.
Is OpenHands safe to run on my machine?
Yes, OpenHands uses Docker containers to create a secure, sandboxed execution environment. This ensures that the agent’s actions—such as running shell commands—are isolated from your host machine’s file system and OS.
Can I use OpenHands for large-scale enterprise projects?
Yes, OpenHands is designed for enterprise readiness. It provides an SDK for building custom agents at scale and supports self-hosting to ensure that data stays within your company’s infrastructure.
Can I use OpenHands for web browsing and research?
OpenHands agents can use an integrated browser to search for documentation, research API specifications, and copy code snippets from the web, making them truly generalist agents.
