multi-model llm abstraction layer with unified interface
OpenHands implements a provider-agnostic LLM abstraction layer that normalizes API calls across OpenAI, Anthropic, Claude, GPT, and other models through a unified message formatting and serialization system. The layer handles model-specific quirks, token counting, cost tracking, and retry logic transparently, allowing agents to switch between providers without code changes. Built on LiteLLM integration with metrics collection and budget management per model.
Unique: Unified abstraction across 20+ LLM providers with built-in metrics collection, cost tracking, and retry/error handling at the framework level rather than delegating to individual integrations. Supports both legacy V0 event-stream architecture and modern V1 conversation-based service with provider token management.
vs alternatives: Deeper provider abstraction than Langchain's LLMChain because it normalizes message formatting, cost tracking, and retry logic at the core rather than as optional middleware, enabling true provider-agnostic agent development.
sandboxed code execution with multi-runtime support
OpenHands provides isolated code execution environments through a pluggable Runtime Architecture that supports Docker, Kubernetes, and local process runtimes. The Sandbox Specification Service defines execution contexts with configurable resource limits, file system isolation, and network policies. Actions execute through an Action Execution Server that marshals code/commands into the sandbox, captures output, and enforces timeout constraints without exposing the host system.
Unique: Pluggable Runtime Architecture with multiple implementations (Docker, Kubernetes, local) managed through a unified Sandbox Specification Service, enabling the same agent code to execute in different environments without modification. Runtime Plugins allow custom execution backends; Action Execution Server provides centralized marshaling and timeout enforcement.
vs alternatives: More flexible than E2B or Replit's sandboxing because it supports on-premise Kubernetes deployments and custom runtime implementations, not just cloud-hosted containers. Deeper isolation than subprocess execution because it enforces resource limits and network policies at the container/pod level.
interactive web ui with real-time conversation management
OpenHands provides a Frontend Application built with React that enables interactive agent conversations through a web browser. The UI implements real-time message streaming via WebSocket, conversation history browsing, and settings management. State Management handles client-side state for conversations, messages, and UI state; Internationalization supports multiple languages. The UI integrates with the backend through REST API (V1) or WebSocket (V0) for seamless real-time updates.
Unique: Frontend Application implements dual-protocol support: WebSocket streaming (V0) for real-time updates and REST polling (V1) for compatibility. State Management handles complex conversation state with optimistic updates; Internationalization framework supports multiple languages through i18n configuration.
vs alternatives: More interactive than CLI-only interfaces because it provides real-time streaming updates and visual conversation history. Deeper integration than generic chat UIs because it displays agent reasoning, action execution traces, and error details inline.
local development environment with hot-reload and debugging
OpenHands provides a Development Environment Setup with Docker Compose configuration for local development, enabling developers to run the full stack (backend, frontend, database, sandbox) locally. The Local Development Workflow supports hot-reload for code changes without restarting services. Testing Strategy includes unit tests, integration tests, and end-to-end tests; Code Quality and Linting enforce standards through automated checks.
Unique: Development Environment Setup uses Docker Compose for reproducible local development; Local Development Workflow supports hot-reload for Python and frontend code. Testing Strategy includes unit, integration, and E2E tests; Code Quality and Linting enforce standards through pre-commit hooks and CI checks.
vs alternatives: More complete than manual setup because Docker Compose provides all dependencies in one command. Better for debugging than production deployments because it includes verbose logging and direct access to all services.
api-driven agent orchestration with rest and websocket protocols
OpenHands exposes agent functionality through a comprehensive REST API (V1 Conversation Endpoints, Settings Endpoints, Secrets Endpoints, Git Endpoints) and WebSocket protocol (V0 WebSocket Protocol) for real-time communication. The API enables programmatic agent creation, message sending, action execution, and conversation management. REST API follows standard HTTP conventions with JSON payloads; WebSocket protocol uses event-based messaging for streaming updates.
Unique: API Reference documents both V1 REST endpoints (Conversation Endpoints, Settings Endpoints, Secrets Endpoints, Git Endpoints) and V0 WebSocket Protocol; dual-protocol support enables both polling and streaming clients. REST API follows standard HTTP conventions; WebSocket protocol uses event-based messaging for real-time updates.
vs alternatives: More comprehensive than simple HTTP APIs because it supports both REST and WebSocket protocols, enabling both polling and streaming clients. Deeper than generic chat APIs because it exposes agent-specific operations like action execution and conversation state management.
agent-driven task decomposition and execution planning
OpenHands implements a planning-reasoning system where agents decompose user requests into discrete actions (code execution, file operations, tool calls) through an Agent Controller that manages conversation state and action sequencing. The system uses chain-of-thought reasoning to decide which actions to take next, with support for both synchronous step-by-step execution and asynchronous parallel action batching. Conversation Lifecycle management tracks state across multiple agent iterations, enabling multi-turn problem solving.
Unique: Agent Controller manages both V0 legacy event-stream architecture and V1 modern conversation-based service, with Conversation Lifecycle tracking state across iterations. Skill Loading System allows agents to discover and use custom tools dynamically; Agent Server Communication uses WebSocket (V0) or REST (V1) for real-time action feedback.
vs alternatives: More sophisticated than simple prompt-based task lists because it uses actual agent reasoning with state management across turns. Deeper integration with execution environment than Langchain agents because sandbox state is tracked per conversation, enabling agents to build on previous actions.
skill and tool discovery with dynamic mcp integration
OpenHands implements a Skill Loading System that dynamically discovers and registers tools available to agents through Model Context Protocol (MCP) integration. Skills are loaded at conversation start, exposing capabilities like Git operations, file manipulation, and custom tools through a unified function-calling interface. The Microagent Discovery System allows agents to find and compose smaller specialized agents as tools, enabling hierarchical task decomposition.
Unique: Skill Loader integrates MCP protocol natively with dynamic discovery at conversation initialization, combined with Microagent Discovery System that allows agents to recursively compose other agents as tools. Git Provider Integration exposes Git operations through both MCP tools and dedicated Git API endpoints, enabling version control as a first-class agent capability.
vs alternatives: More flexible than Langchain's tool binding because skills are discovered dynamically via MCP rather than statically registered, and microagent composition enables hierarchical problem-solving that flat tool lists cannot support.
conversation-based state management with event streaming
OpenHands manages agent state through a Conversation Service that tracks all actions, messages, and results across multiple agent iterations. The system uses an event-driven architecture where each action generates events (action_start, action_end, error) that are streamed to clients in real-time via WebSocket (V0) or REST polling (V1). Conversation metadata is persisted to SQL storage, enabling conversation history retrieval, resumption, and analysis.
Unique: App Conversation Service implements dual-architecture support: V0 legacy event-stream system with WebSocket communication and V1 modern REST-based conversation endpoints. Conversation Lifecycle management tracks state through multiple agent iterations; SQL Event Callback Service persists all events to external database for audit and replay. Sandbox Integration ensures each conversation has isolated execution context.
vs alternatives: More comprehensive than simple message history because it captures full action execution traces (start, end, errors) with real-time streaming, enabling both interactive debugging and post-hoc analysis. Deeper than Langchain's memory implementations because state is tied to sandboxed execution context, not just LLM context.
+5 more capabilities