OpenHands is an AI-powered software development agent designed to function much like a human peer. It can modify code, execute terminal commands, browse the web, and call APIs. It is even capable of sourcing snippets from Stack Overflow when a specific implementation requires external documentation.
The platform provides a comprehensive suite of integrated tools, including a chat interface, a code editor, a web browser, and a Jupyter IPython console. Coding tasks are managed by the OpenDevin CodeAct 1.0 model, which serves as the system's core. This model is capable of handling complex logic—from writing scripts that aggregate GitHub commit counts to implementing HTTP retry logic or generating data visualizations with matplotlib.
The most straightforward way to get started is via Docker. First, pull the required runtime image:
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.28-nikolaik
Then, launch the container using the following command:
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.28-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands-state:/.openhands-state \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.28
Once the container is running, navigate to http://localhost:3000 in your web browser.
You will need to configure a model provider and an API key. While several models are supported, Anthropic's Claude 3.5 Sonnet (anthropic/claude-3-5-sonnet-20241022) is currently the top performer for these tasks.
OpenHands offers several flexible deployment options, such as mounting your local filesystem, running in headless mode for automated scripting, or interacting via a CLI. You can also integrate it into GitHub Actions to trigger based on specific issue labels. For detailed instructions, refer to the "Running OpenHands" section in the official documentation.
OpenHands is currently optimized for use on an individual developer's local workstation. It does not yet include built-in multi-tenant isolation or enterprise-level scaling. For shared or high-scale deployments, contact the team regarding advanced options.
If you wish to modify the source code, consult Development.md. If you encounter issues during setup or execution, the troubleshooting guide provides solutions for common problems.
You can initiate a task with a simple, direct instruction:
"Write a bash script
hello.shthat prints 'hello world!'"
OpenHands will write the script, update the file permissions, and execute it to verify the output.
You can then iterate on the result:
"Modify
hello.shto accept a name as the first argument. Default to 'world' if no argument is provided."
Or even switch to a different language:
"Convert
hello.shto a Ruby script and execute it."
Note that the agent may require a brief moment to configure the necessary environment for new languages.
The agent is particularly effective at "greenfield" tasks where no prior code context exists. For the best results, be specific about your requirements and preferred technology stack.
"Build a frontend-only TODO app in React. Store all task state in localStorage."
Once the base application is functional, you can refine the features:
"Add an optional due date field for each task."
It is good practice to commit and push changes frequently. You can direct the agent to handle this as well:
"Commit these changes and push them to a new branch titled 'feature/due-dates'."
OpenHands excels at inserting new features into established codebases. For example, you can ask it to add a linting workflow to your repository; it will inspect the project to identify the programming language and create a corresponding .github/workflows/lint.yml file.
"Add a GitHub Action to lint the code in this repository."
While the agent can navigate the repository using ls and grep, providing specific file paths helps save time and reduce token usage.
"Modify
./backend/api/routes.jsto add a new route that returns the complete list of tasks."
"Create a new React component in
./frontend/componentsto display a list of widgets, utilizing the existingWidgetcomponent."
OpenHands is well-suited for targeted refactoring tasks, such as breaking down long functions or renaming variables. However, it is usually better to avoid asking for a total rewrite of a large codebase in a single step.
"Rename all single-letter variables in
./app.goto more descriptive names."
"Split the
build_and_deploy_widgetsfunction inwidget.phpinto two distinct functions:build_widgetsanddeploy_widgets."
"Deconstruct
./api/routes.jsinto separate files organized by route."
The agent can identify and fix software defects, though bug resolution often requires more detailed context. If you have already identified the root cause, OpenHands can implement the fix directly.
"The
/subscribeendpoint is currently rejecting.iodomains. Please fix this validation logic."
"The
search_widgetsfunction in./app.pyis case-sensitive. Modify it to be case-insensitive."
Using a test-driven approach often yields the best results. You can ask the agent to write a failing test case before implementing the fix.
"The
hellofunction crashes when passed an empty string. Write a test that reproduces this crash, then fix the code so the test passes."
While OpenHands can assist with almost any programming task, a few best practices will help you get the most out of the agent:
For further optimization, refer to the prompt best practices guide.
Skill Seeker: Convert Any Documentation Site Into Claude AI Skills
AoxVPN 8.8 Member Day Sale | No-Log VPN Featuring IEPL Private Lines
Infinite Radio: The AI DJ That Adapts Music Genres to Your Screen
Mars3D Vue Examples: 381 Interactive 3D Map Demos and Live Code Editing
OxyGent: Build Multi-Agent Systems That Learn and Scale Without YAML
Alger Music Player: Play Grayed-Out NetEase Songs with Desktop Lyrics
LetsMarkdown: Lightweight Collaborative Markdown Editor Powered by Rust
TikTok Scraper: Download Watermark-Free Videos Without Login
ThinkChain: Stream Claude's Reasoning with Local Tools and MCP
Teable: The Self-Hosted, PostgreSQL-Based Airtable Alternative
IOPaint: Free Open-Source Image Inpainting and Object Removal
How to Add Missing Games to Shendeng VPN’s Library