The OpenHands Software Agent SDK: A Composable and Extensible Foundation for Production Agents

Xingyao Wang, Simon Rosenberg, Juan Michelini, Calvin Smith, Hoang H. Tran, Engel Nyst, Rohit Malhotra, Xuhui Zhou, Valerie Chen, Robert Brennan, Graham NeubigarXiv 2025 · DOI

Abstract

OpenHands V1 introduces a modular, event-sourced SDK designed to bridge the gap between AI software agent research prototypes and robust production systems. By decoupling agent logic from execution environments and implementing a "local-first, deploy-anywhere" architecture, OpenHands provides a flexible, secure, and model-agnostic foundation for autonomous software development.

Introduction

While autonomous agents have demonstrated potential in solving complex software engineering tasks, transitioning these systems into production environments presents significant architectural challenges. Early frameworks often suffered from monolithic designs where core logic was tightly coupled with specific user interfaces, rigid sandboxing that hindered local development, and fragmented state management. These "architectural tensions" made systems brittle, difficult to extend, and prone to session corruption. The OpenHands SDK addresses these issues by standardizing a composable framework that treats agents as stateless processors and conversations as immutable, event-sourced logs.

Architecture and Methodology

The OpenHands SDK is built upon a modular redesign organized into four primary packages that separate concerns across the agent lifecycle:

  1. openhands.sdk: Defines core abstractions for agents, LLMs, and the underlying event system.
  2. openhands.tools: Provides a library of concrete tool implementations, such as bash shells and file editors.
  3. openhands.workspace: Manages execution environments, supporting transitions from local shells to secure remote Docker containers.
  4. openhands.agent_server: A FastAPI-based implementation that exposes agent capabilities via REST and WebSockets.
High-level modular architecture of the OpenHands SDK, showing the relationship between core packages and execution environments.

Technical Innovations

The system's robustness stems from several key technical shifts:

  • Event-Sourced State: By recording every interaction as an immutable event, the system enables deterministic replay. This allows developers to reconstruct an agent's state at any historical point for debugging or auditing.
  • Action–Execution–Observation Pattern: A strict protocol ensures that LLMs propose structured JSON actions, which a ToolExecutor processes to return structured observations, maintaining a clean boundary between reasoning and execution.
  • Dynamic Multi-LLM Routing: Through the RouterLLM class, the SDK can dynamically switch between models within a single session—for instance, utilizing a cost-effective model for text processing while invoking a multimodal model for visual tasks.
Detailed system architecture illustrating the flow from the API server through the Agent Controller to the Event Stream and Runtime Client.

Evaluation and Key Results

The OpenHands SDK was evaluated using the SWE-Bench Verified benchmark for real-world software bug resolution and the GAIA benchmark for general multi-step reasoning.

The SDK achieved state-of-the-art performance:

  • SWE-Bench Verified: A 72.8% resolution rate was achieved using Claude 3.5 Sonnet with extended thinking capabilities.
  • GAIA: The system reached 67.9% accuracy on the validation set.

Beyond performance metrics, a feature comparison against major industry SDKs (OpenAI, Claude, Google) revealed that OpenHands is uniquely positioned in offering native remote sandboxed execution, integrated security analysis, and interactive workspaces (including VS Code and VNC support) out of the box.

Discussion and Insights

A central philosophy of OpenHands is that optional isolation is superior to mandatory sandboxing. This "local-first" approach allows developers to prototype with minimal overhead while retaining the ability to deploy to secure remote environments with a single configuration change. Furthermore, by treating agents as stateless and conversations as the sole source of truth, the system gains resilience against crashes and improved scalability.

Security is integrated as a core component rather than an afterthought. The SecurityAnalyzer evaluates the risk of tool calls (Low to High) and can enforce human-in-the-loop confirmation for high-risk operations. Additionally, the framework remains provider-agnostic, supporting over 100 model providers via LiteLLM.

Limitations and Future Work

Current limitations include the lack of native "long-term memory" across disparate sessions, a feature found in some competing frameworks like Google’s ADK. While the SDK supports sub-agent delegation, future work will focus on more complex hierarchical coordination and massive multi-agent swarm orchestration to further scale the system's capabilities.

Summary updated

BibTeX
@misc{wang2025openhands,
  author = {Xingyao Wang and Simon Rosenberg and Juan Michelini and Calvin Smith and Hoang H. Tran and Engel Nyst and Rohit Malhotra and Xuhui Zhou and Valerie Chen and Robert Brennan and Graham Neubig},
  title = {{The OpenHands Software Agent SDK: A Composable and Extensible Foundation for Production Agents}},
  year = {2025},
  eprint = {2511.03690},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.03690},
}
Figure