- Repository: OpenHands/OpenHands
- Type: Comprehensive AI Software Development Agent (Application & Framework)
- Main Purpose: A platform for "AI-driven development" where autonomous agents (like the CodeAct agent) write code, run tests, and browse the web to solve software engineering tasks. Supports running via CLI, Local GUI, or Cloud.
- Event-Driven Loop: The core orchestration is an event loop where the Agent emits
Actions(e.g.,CmdRunAction,IPythonRunCellAction) and receivesObservations(e.g.,CmdOutputObservation). - Runtime Abstraction: Actions are executed by a
Runtime. The default is the Docker Runtime, which spins up an isolated Docker container for each session. - Plugin System: Capabilities are injected via "Skills" or "Plugins" (e.g.,
AgentSkillsfor file ops,JupyterRequirementfor python execution) which run inside the sandboxed environment. - Client/Server: A FastAPI-based
App Servermanages sessions (conversations) and streams events to the frontend or CLI.
- App Server (
openhands/app_server): The V1 backend handling REST API, User Auth, and bridging to the agent runtime. - Runtime (
openhands/runtime): Manages execution environments.DockerRuntime: Runs actions in an isolated container (default).LocalRuntime: Runs directly on host (no isolation).RemoteRuntime: Connects to a remote execution server.
- Agents (
openhands/agenthub):- CodeAct Agent: The primary agent. Uses "Code as Action" - primarily writing Python/Bash to solve tasks. It supports function calling for tools like browser and file editing.
- Sandbox: The actual environment (typically a Docker container) where the agent's code runs.
- Built-in CLI:
openhands-cliallows running the agent directly from the terminal. - Modes:
- CLI Mode: Familiar to
Claude Codeusers. - Headless: For automated tasks (e.g., evaluation benchmarks like SWE-bench).
- CLI Mode: Familiar to
- Condenser: The
CodeActAgentincludes aCondensermechanism (openhands.memory.condenser) to compress conversation history, removing less relevant events to save tokens while preserving context. - Efficient Tools: "CodeAct" approach (writing code to find info) is often more token-efficient than pure chat-based browsing/search.
- Configuration: Supports
max_iterationsandmax_budget_per_task. - Sandbox Timeouts: The runtime handles execution timeouts for commands.
- Safety: Docker isolation prevents the agent from damaging the host system (when using Docker Runtime).
- Stateful Sessions: The server maintains state, allowing the agent to work autonomously for extended periods (e.g., fixing a GitHub issue).
- Background Execution: Can run in "headless" mode for batch processing.
- Docker Containers: This is a core feature. Each session gets a fresh, isolated container.
- FileSystem: The agent works within the container's filesystem. Users can mount their local directories into the container.
- CodeAct: Strong focus on agents that write and execute code (Bash/Python) rather than just outputting text.
- Browser Support: Verified browser interaction capabilities (via
BrowserEnv). - Evaluation Framework: Includes a robust suite for benchmarking agents (SWE-bench, etc.).
OpenHands is a mature, production-grade Autonomous Software Engineer platform. Unlike crystal or superset (which are "human-in-the-loop" multi-session managers), OpenHands focuses on autonomous execution of complex tasks in a sandboxed environment. It is more similar to Devin or AutoGPT but specialized for coding.