OpenHands: Complete Repository Analysis
openhands-2
OpenHands: Complete Repository Analysis
Table of Contents
| # | Document | Description |
|---|---|---|
| 01 | Purpose & Problem | What OpenHands does, the problem it solves, target users |
| 02 | Tech Stack | Languages, frameworks, key dependencies and rationale |
| 03 | Architecture | Core components, interactions, data flow diagrams |
| 04 | Entry Points & Execution Flow | Where execution starts, main code paths, state transitions |
| 05 | Design Patterns & Decisions | Patterns used, tradeoffs, clever implementation details |
| 06 | Key Files Map | Essential files, file-to-responsibility mapping |
| 07 | LLM Integration Deep Dive | How LLMs are leveraged, guardrails, prompting techniques |
| 08 | Lessons & Takeaways | Good ideas to learn from, potential pitfalls to avoid |
Quick Summary
OpenHands (formerly OpenDevin) is an open-source platform for building AI agents that autonomously complete software development tasks. It achieves 77.6% on the SWE-Bench benchmark. The system:
- Accepts a task from a user (via web UI or CLI)
- Spins up a sandboxed runtime environment (Docker container, Kubernetes pod, or local process)
- Runs an LLM-powered agent loop that can execute shell commands, edit files, browse the web, and run Python code
- Streams results back to the user in real-time via WebSocket
The codebase is in active migration from V0 (monolithic Python controller) to V1 (modular SDK-based architecture). V0 is scheduled for removal on April 1, 2026.
Version: 1.6.0
License: MIT (enterprise/ is source-available)
Python: 3.12-3.13
Node.js: 22+
Default Model: claude-opus-4-5 (configurable to any provider via LiteLLM)