CodeDocs Vault

00 — High-Level Overview

What is OpenHands?

OpenHands (formerly OpenDevin) is an AI-powered autonomous software development platform. It enables LLM-based agents to perform real-world software engineering tasks — writing code, executing shell commands, browsing the web, editing files, and interacting with APIs — inside sandboxed runtime environments.

SWE-Bench Verified score: 77.6% — one of the highest published results for autonomous software engineering.

Target Users

Audience Interface Deployment
Individual developers CLI (openhands/core/main.py) or Web GUI Local Docker
Teams Cloud SaaS (all-hands.dev) Managed
Enterprises Self-hosted Docker / Kubernetes

Tech Stack

Layer Technology
Language Python 3.12+
Backend API FastAPI / Uvicorn
Frontend React 19, TypeScript, Vite
Sandbox Docker containers (primary), Kubernetes, local, remote
LLM Abstraction LiteLLM (supports OpenAI, Anthropic, Google, local models, and more)
Agent Framework Custom agent loop with registry pattern, event-driven architecture
Configuration TOML + Pydantic models + environment variables
Storage Pluggable FileStore (local, S3, Google Cloud)
License MIT (core), source-available (enterprise features)

Directory Structure

OpenHands/
├── openhands/                  # Main Python package
│   ├── agenthub/               # Agent implementations
│   │   └── codeact_agent/      #   Primary agent (CodeAct)
│   ├── app_server/             # V1 application server (FastAPI)
│   ├── controller/             # Agent controller, state management, stuck detection
│   │   └── agent.py            #   Agent ABC with registry pattern
│   ├── core/                   # Core infrastructure
│   │   ├── config/             #   Configuration classes (Pydantic)
│   │   ├── main.py             #   CLI entry point (V0)
│   │   └── schema/             #   AgentState enum, action/observation types
│   ├── events/                 # Event system (pub/sub)
│   │   ├── event.py            #   Event base dataclass
│   │   ├── stream.py           #   EventStream hub
│   │   ├── action/             #   Action event types (~15 types)
│   │   └── observation/        #   Observation event types (~15 types)
│   ├── integrations/           # Git provider integrations (GitHub, GitLab, etc.)
│   ├── llm/                    # LLM abstraction layer
│   │   ├── llm.py              #   LLM class wrapping LiteLLM
│   │   ├── llm_registry.py     #   LLMRegistry factory
│   │   └── fn_call_converter.py#   Native ↔ emulated function calling
│   ├── memory/                 # Memory and context management
│   │   ├── memory.py           #   Memory component (microagent retrieval)
│   │   └── condenser/          #   History condensation strategies
│   ├── microagent/             # Microagent system (repo/knowledge agents)
│   ├── runtime/                # Sandbox runtime implementations
│   │   ├── base.py             #   Runtime ABC
│   │   ├── docker/             #   Docker runtime
│   │   └── impl/               #   Remote, local, K8s, CLI runtimes
│   ├── security/               # Security analysis framework
│   ├── server/                 # V0 web server (legacy, FastAPI + WebSocket)
│   └── storage/                # FileStore abstractions (local, S3, GCS)
├── frontend/                   # React 19 web application
├── containers/                 # Docker build contexts
├── evaluation/                 # Benchmarking (SWE-Bench, etc.)
├── skills/                     # Global microagent definitions
├── config.template.toml        # Configuration template
└── pyproject.toml              # Python project metadata

Key Concepts