OpenHands
The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.
OpenHands (formerly OpenDevin) is an open-source platform that turns AI coding agents into a self-hosted, always-on engineering team. It provides a developer control center for starting agent conversations, building automation pipelines, and running agents across multiple backends — all from a single interface. Whether you want an agent running on your laptop or a shared fleet of agents handling code review and dependency updates on a remote server, OpenHands handles the orchestration.
The platform is built around the Agent-Client Protocol (ACP), which means it works with the built-in OpenHands agent out of the box, but can also run Claude Code, OpenAI Codex, Gemini, or any third-party agent that implements the protocol. This model-agnostic design means teams are never locked into a single AI provider or agent implementation.
OpenHands includes a full automation engine that integrates with GitHub, Slack, Linear, Notion, and other developer tools. Automations can be triggered on a schedule or in response to webhook events — for example, automatically decomposing GitHub issues into tasks or generating weekly engineering reports that publish directly to a Slack channel.
The project ships with a FastAPI backend, a React-based frontend, Docker sandbox support for isolated agent execution, and a comprehensive REST API. It has an active open-source community with frequent releases and production-grade self-hosting documentation for teams that want full control over their AI development infrastructure.
What You Get
- A self-hosted web UI for managing and conversing with AI coding agents across multiple backend environments
- Docker sandbox support that isolates agent execution from your host filesystem with configurable project directory mounting
- Webhook-driven automation engine that connects agents to GitHub, Slack, Linear, Notion, and other developer tools
- Agent-Client Protocol (ACP) compatibility to run OpenHands, Claude Code, Codex, Gemini, or any ACP-compatible agent
- Multi-backend switching — connect to local, remote VM, Docker, or OpenHands Cloud backends from the same frontend
- A REST API and MCP server for integrating agent capabilities into your own tooling or CI/CD pipelines
- Built-in secrets management and per-user settings for LLM API keys and agent configuration
- Scheduled and event-triggered automations with a prebuilt library for common developer workflows
Common Use Cases
- Automated code review — trigger an agent on every pull request to review code, suggest improvements, and post feedback as GitHub comments
- Issue decomposition — automatically break down new GitHub issues into subtasks using an agent triggered by a webhook
- Dependency update automation — run a scheduled agent that checks for outdated packages and opens pull requests with upgrades
- Developer report generation — schedule agents to generate weekly engineering metrics and publish them to Slack or Notion
- Multi-agent team setup — run a shared agent backend for the team’s code review workflows while keeping personal agents on a local laptop
- Exploratory coding sessions — use the web UI to start conversational coding sessions where the agent has access to your project directories in a sandboxed environment
Under The Hood
Architecture
OpenHands follows a layered, modular service architecture that separates concerns cleanly across distinct domains. The backend is organized around abstract base classes — AppConversationService, SandboxService, and related abstractions — which define contracts that can be swapped between implementations (Docker-local, remote VM, cloud-hosted) without changes to higher-level code. This dependency-injection-friendly design means the routing layer depends only on interfaces, not concrete services, making the system highly testable and extensible. Request handling flows from FastAPI routers through service layers to backend adapters, with a separate event-callback subsystem handling asynchronous webhook triggers independently from the synchronous conversation API. The result is a clean boundary between real-time agent interactions and scheduled/event-driven automation workflows.
Tech Stack
The backend is written in Python 3.12+ using FastAPI for the HTTP API layer and asyncpg with SQLAlchemy for PostgreSQL-backed persistence, enabling fully async database operations throughout. Agent execution is coordinated via the OpenHands Agent Server SDK (a separate package), with Docker integration via the Docker Python SDK for sandbox lifecycle management. LLM routing is handled by litellm, which abstracts over OpenAI, Anthropic, Google, and other providers behind a unified interface. The frontend is a React application bundled with Vite and served as a static SPA from the Python backend. Third-party integrations with GitHub, GitLab, Forgejo, Bitbucket, Azure DevOps, and Linear are implemented as provider modules under a common protocol interface. Deployment is via Docker Compose or NPM global install, with a self-hosted ingress layer managed by the agent-canvas CLI tool.
Code Quality
The codebase demonstrates strong engineering discipline: abstract base classes are used extensively for all service boundaries, and the test suite covers routers, services, middleware, and database sessions with an async pytest setup. Custom exceptions are defined per module with descriptive names like ConversationExportTooLarge and SandboxError, ensuring errors are explicit rather than swallowed. Type annotations are comprehensive throughout, and the project enforces consistency via a configured linter and CI pipeline that runs on every commit. The enterprise/ directory follows the same conventions as the open-source core, with clear separation via dynamic imports so the enterprise layer can override specific behaviours without forking. Documentation is extensive — a CONTRIBUTING.md, Development.md, self-hosting guide, and inline docstrings on all public service methods provide comprehensive onboarding resources.
What Makes It Unique OpenHands’ most distinctive technical decision is the Agent-Client Protocol (ACP), a standardized interface that decouples the control plane (Agent Canvas frontend + app server) from any specific agent implementation. Unlike tools that are tightly coupled to a single AI backend, OpenHands can run Claude Code, Codex, Gemini, or the built-in OpenHands agent interchangeably — swapping the agent without changing the automation layer, conversation history, or integration wiring. The multi-backend architecture compounds this: a developer can share one agent backend with their team for automated workflows while running a personal backend locally, all managed from one UI. The automation engine’s webhook-and-schedule model, combined with first-class integrations for Slack and GitHub, positions OpenHands as an always-on engineering teammate rather than just an interactive chat tool.
Self-Hosting
OpenHands is dual-licensed. The main codebase outside the enterprise/ directory is MIT-licensed, which means you can use it commercially, modify it, distribute it, and self-host it without restriction. The MIT license has no copyleft implications, so integrating it into proprietary workflows or building on top of it does not require you to open-source your own code. The enterprise/ directory is separately licensed under the Polyform Free Trial License, which is not an open-source license and limits usage to 30 days per calendar year without a commercial agreement — the enterprise directory powers the managed OpenHands Cloud offering.
Running OpenHands yourself requires meaningful infrastructure investment. The minimal setup involves Node.js 22+ and either uv (for running the agent server directly) or Docker (for sandboxed execution). For production self-hosting on a server, you will need to handle your own TLS termination, firewall rules, and user access controls — the self-hosting guide covers security hardening in detail. The agent server and automation server are separate processes that can be deployed independently, which gives you flexibility but also means managing multiple services. Persistent storage, database maintenance (via SQLAlchemy/asyncpg), and keeping both the app server and agent server Docker images up to date are your responsibility as a self-hoster.
Compared to the managed OpenHands Cloud offering, self-hosters give up automatic upgrades, managed uptime SLAs, built-in OAuth authentication (the open-source version uses personal access tokens, while cloud uses OAuth with short-lived tokens), and dedicated support. The enterprise tier also adds authentication via Keycloak and GitHub OAuth, advanced user management, and deeper integrations that are not present in the MIT-licensed core. For teams that need always-on agents without the overhead of managing infrastructure, OpenHands Cloud removes the operational burden entirely.
Related Apps
claw-code
AI Agents · AI Code Assistants
A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.
claw-code
MITOpenCode
AI Code Assistants
A fully open-source AI coding agent built for the terminal, with a TUI, desktop app, web client, plugin system, and SDK — one of the most-starred AI coding agents on GitHub.
OpenCode
MITOllama
AI Development · Developer Tools
Run Llama, Gemma, DeepSeek, and other open LLMs on your own machine with one command and an OpenAI-compatible API.