title: "OpenHands"
description: "Autonomous AI software engineering agent (formerly OpenDevin) that can write code, run commands, browse the web, and interact with files. Runs in sandboxed Docker environments. Supports 50+ LLM backends. Use for automated research coding, experiment implementation, and autonomous repository management."
skillName: "openhands"
skillVersion: "1.0.0"
skillAuthor: "Orchestra Research"
skillLicense: "MIT"
skillTags: ["Agents", "OpenHands", "Autonomous Coding", "Software Engineering", "Docker", "Code Generation", "Research Automation", "Multi-LLM"]
skillDeps: ["openhands-ai", "docker"]
|
|
| Version |
1.0.0 |
| Author |
Orchestra Research |
| License |
MIT |
| Tags |
Agents OpenHands Autonomous Coding Software Engineering Docker |
| Dependencies |
openhands-ai docker |
OpenHands — Autonomous AI Software Engineer
Formerly OpenDevin. An AI agent that writes code, runs experiments, and manages repositories autonomously.
When to use OpenHands
Use OpenHands when:
- Automating research experiment implementation
- Autonomous codebase exploration and modification
- Running multi-step coding tasks without human intervention
- Integrating with GitHub for PR creation and review
- Building research pipelines that write their own code
Metrics:
- 40,000+ GitHub stars
- 50+ LLM backends supported
- Sandboxed Docker execution (safe by default)
- Can browse web, run terminal, edit files autonomously
Quick start
# Using Docker (recommended)
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.38
# Access web UI at http://localhost:3000
Python API
from openhands.core.main import create_runtime, run_controller
from openhands.core.config import AppConfig, SandboxConfig, LLMConfig
# Configure
config = AppConfig(
llm=LLMConfig(
model="claude-sonnet-4-5-20250929",
api_key="your-api-key"
),
sandbox=SandboxConfig(
base_container_image="python:3.12-slim"
)
)
# Run autonomous task
task = """
Implement a GRPO training loop using TRL.
The script should:
1. Load a base model (e.g., Qwen2.5-1.5B)
2. Define a reward function based on format compliance
3. Run 100 training steps and log metrics to W&B
4. Save the final checkpoint
"""
await run_controller(config=config, initial_user_action=task)
Research automation workflow
from openhands_ai import OpenHands
client = OpenHands(api_key="your-key")
# Autonomous experiment implementation
session = client.create_session(
llm_config={"model": "claude-opus-4-5", "temperature": 0.1},
sandbox_config={"image": "pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime"}
)
result = session.run("""
Read the paper at ./papers/flash_attention_3.pdf.
Implement the core algorithm in PyTorch.
Run a benchmark comparing throughput vs standard attention on seq_len=[512, 1024, 2048, 4096].
Generate a plot and save to ./results/benchmark.png.
""")
print(result.summary)
print(result.files_created)
GitHub integration
# Resolve GitHub issues autonomously
resolver = GitHubIssueResolver(
github_token="ghp_...",
llm_config={"model": "claude-sonnet-4-5-20250929"},
)
# Process a batch of issues
resolver.resolve_issues(
repo="your-org/research-repo",
issue_numbers=[42, 43, 44],
max_iterations=50 # per issue
)
Key capabilities
| Capability |
Description |
| File editing |
Read, write, and refactor code files |
| Terminal |
Run bash commands, pip installs, training scripts |
| Web browsing |
Fetch papers, documentation, GitHub repos |
| GitHub |
Create PRs, resolve issues, review code |
| Jupyter |
Execute notebooks interactively |
| Multi-step planning |
Break down complex research tasks |
Supported LLM backends
# config.toml
[llm]
model = "claude-sonnet-4-5-20250929"
# OR
model = "gpt-4o"
model = "gemini/gemini-2.0-flash"
model = "ollama/llama3.2"
model = "deepseek/deepseek-chat"
Best practices for research
- Use Claude Opus/Sonnet for complex multi-step research tasks
- Set
max_iterations=100 for long experiments
- Mount your dataset directory as a volume:
-v /data:/workspace/data
- Use
LOG_ALL_EVENTS=true to trace agent decisions
- For reproducibility: pin the runtime container version
Common pitfalls
- Docker not running: OpenHands requires Docker daemon
- Context window exceeded: Break large tasks into subtasks
- Infinite loops: Set
max_iterations as a hard stop
- Slow startup: Runtime container pull can take 2–5 minutes first time
References
1---2name: openhands3description: ---4---5---6 title: "OpenHands"7 description: "Autonomous AI software engineering agent (formerly OpenDevin) that can write code, run commands, browse the web, and interact with files. Runs in sandboxed Docker environments. Supports 50+ LLM backends. Use for automated research coding, experiment implementation, and autonomous repository management."8 skillName: "openhands"9 skillVersion: "1.0.0"10 skillAuthor: "Orchestra Research"11 skillLicense: "MIT"12 skillTags: ["Agents", "OpenHands", "Autonomous Coding", "Software Engineering", "Docker", "Code Generation", "Research Automation", "Multi-LLM"]13 skillDeps: ["openhands-ai", "docker"]14 ---1516 | | |17 |---|---|18 | **Version** | 1.0.0 |19 | **Author** | Orchestra Research |20 | **License** | MIT |21 | **Tags** | `Agents` `OpenHands` `Autonomous Coding` `Software Engineering` `Docker` |22 | **Dependencies** | `openhands-ai` `docker` |232425 # OpenHands — Autonomous AI Software Engineer2627 Formerly OpenDevin. An AI agent that writes code, runs experiments, and manages repositories autonomously.2829 ## When to use OpenHands3031 **Use OpenHands when:**32 - Automating research experiment implementation33 - Autonomous codebase exploration and modification34 - Running multi-step coding tasks without human intervention35 - Integrating with GitHub for PR creation and review36 - Building research pipelines that write their own code3738 **Metrics**:39 - **40,000+ GitHub stars**40 - **50+ LLM backends** supported41 - Sandboxed Docker execution (safe by default)42 - Can browse web, run terminal, edit files autonomously4344 ## Quick start4546 ```bash47 # Using Docker (recommended)48 docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik4950 docker run -it --rm --pull=always \51 -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \52 -e LOG_ALL_EVENTS=true \53 -v /var/run/docker.sock:/var/run/docker.sock \54 -p 3000:3000 \55 --add-host host.docker.internal:host-gateway \56 --name openhands-app \57 docker.all-hands.dev/all-hands-ai/openhands:0.385859 # Access web UI at http://localhost:300060 ```6162 ### Python API6364 ```python65 from openhands.core.main import create_runtime, run_controller66 from openhands.core.config import AppConfig, SandboxConfig, LLMConfig6768 # Configure69 config = AppConfig(70 llm=LLMConfig(71 model="claude-sonnet-4-5-20250929",72 api_key="your-api-key"73 ),74 sandbox=SandboxConfig(75 base_container_image="python:3.12-slim"76 )77 )7879 # Run autonomous task80 task = """81 Implement a GRPO training loop using TRL.82 The script should:83 1. Load a base model (e.g., Qwen2.5-1.5B)84 2. Define a reward function based on format compliance85 3. Run 100 training steps and log metrics to W&B86 4. Save the final checkpoint87 """8889 await run_controller(config=config, initial_user_action=task)90 ```9192 ### Research automation workflow9394 ```python95 from openhands_ai import OpenHands9697 client = OpenHands(api_key="your-key")9899 # Autonomous experiment implementation100 session = client.create_session(101 llm_config={"model": "claude-opus-4-5", "temperature": 0.1},102 sandbox_config={"image": "pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime"}103 )104105 result = session.run("""106 Read the paper at ./papers/flash_attention_3.pdf.107 Implement the core algorithm in PyTorch.108 Run a benchmark comparing throughput vs standard attention on seq_len=[512, 1024, 2048, 4096].109 Generate a plot and save to ./results/benchmark.png.110 """)111112 print(result.summary)113 print(result.files_created)114 ```115116 ## GitHub integration117118 ```python119 # Resolve GitHub issues autonomously120 resolver = GitHubIssueResolver(121 github_token="ghp_...",122 llm_config={"model": "claude-sonnet-4-5-20250929"},123 )124125 # Process a batch of issues126 resolver.resolve_issues(127 repo="your-org/research-repo",128 issue_numbers=[42, 43, 44],129 max_iterations=50 # per issue130 )131 ```132133 ## Key capabilities134135 | Capability | Description |136 |-----------|-------------|137 | **File editing** | Read, write, and refactor code files |138 | **Terminal** | Run bash commands, pip installs, training scripts |139 | **Web browsing** | Fetch papers, documentation, GitHub repos |140 | **GitHub** | Create PRs, resolve issues, review code |141 | **Jupyter** | Execute notebooks interactively |142 | **Multi-step planning** | Break down complex research tasks |143144 ## Supported LLM backends145146 ```yaml147 # config.toml148 [llm]149 model = "claude-sonnet-4-5-20250929"150 # OR151 model = "gpt-4o"152 model = "gemini/gemini-2.0-flash"153 model = "ollama/llama3.2"154 model = "deepseek/deepseek-chat"155 ```156157 ## Best practices for research158159 - Use **Claude Opus/Sonnet** for complex multi-step research tasks160 - Set `max_iterations=100` for long experiments161 - Mount your dataset directory as a volume: `-v /data:/workspace/data`162 - Use `LOG_ALL_EVENTS=true` to trace agent decisions163 - For reproducibility: pin the runtime container version164165 ## Common pitfalls166167 - **Docker not running**: OpenHands requires Docker daemon168 - **Context window exceeded**: Break large tasks into subtasks169 - **Infinite loops**: Set `max_iterations` as a hard stop170 - **Slow startup**: Runtime container pull can take 2–5 minutes first time171172 ## References173 - [OpenHands GitHub](https://github.com/All-Hands-AI/OpenHands)174 - [Documentation](https://docs.all-hands.dev/)175 - [Model Support](https://docs.all-hands.dev/usage/llms)176