OpenHands/software-agent-sdk
Python SDK and remote runtime for agents that work on code
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
OpenHands is a Python execution SDK organized as a four-package uv workspace: openhands-sdk, openhands-tools, openhands-workspace, and openhands-agent-server. In the quickstart, an LLM and explicit tool registrations configure an Agent; a Conversation binds that agent to a workspace, accepts a message, and executes it via run(). The terminal, file editor, and task tracker tools are separate from the core agent configuration.
Agent Server provides the remote execution path. Its REST/WebSocket API and OpenAPI contract underpin the browser-compatible clients/typescript/ client, which is consumed by Agent Canvas. Scheduling, webhooks, run history, and dispatch belong to the separate OpenHands/automation project; this SDK executes the dispatched conversations. The root manifest constrains Starlette to >=0.49.1 and aiohttp to >=3.13.3, but does not establish which dependency handles each server function.
Key Capabilities & Differentiators
The core workflow is to give a model code-oriented tools and a workspace in which to act. The quickstart uses gpt-5.5 with LLM_API_KEY and writes a file in the current directory. The SDK also targets recurring dependency maintenance and multi-agent refactors. In v1.65.0, sub-agent usage rollups gained model-name attribution, useful when reviewing how a multi-agent run consumed model resources.
Examples cover custom tools, remote WebSocket integration, GitHub workflows, AgentSkills, and plugins; the guides also cover MCP. Public skill loading is opt-in via AgentContext(load_public_skills=True). The default marketplace includes uv and deno skills that can use repository markers such as uv.lock and deno.json. The quickstart verifies one model configuration, not a full provider compatibility matrix; test your intended model and tool combination before standardizing on it.
Trade-offs & Limitations
Compared with assembling a coding agent from a general-purpose framework, OpenHands supplies the code workspace, terminal and file tools, and remote conversation API as part of the design. Compared with adopting a finished coding CLI, it gives integrators control over model, tools, and execution environment, but leaves product UI and scheduling to separate components or the adopting team. It is best evaluated as an execution layer, not as a complete automation service.
Local execution simplifies development, but tools act against the selected local workspace. Ephemeral remote workspaces provide a separate execution boundary at the cost of provisioning and operating Agent Server and its runtimes. Before running on shared infrastructure, validate filesystem access, secret scope, and network policy; the workspace mode alone does not establish tenant isolation. MIT permits commercial integration, while hosted model costs, data handling, and third-party terms remain separate decisions.
Hardware & Deployment Guide
Use Python for the embedded SDK; the source-development workflow uses make build to install workspace dependencies and pre-commit hooks. Use Agent Server with Docker or Kubernetes for ephemeral remote workspaces, with REST/WebSocket for integration. The quickstart's API-key-backed model path is distinct from the location of the execution workspace. A self-hosted runner does not establish offline inference. The workspace manifest constrains nodejs-wheel-binaries to >=24,<25; that is not evidence of a universal host Node.js prerequisite.
Size the execution tier for concurrent workspaces, checkouts, builds, and tests rather than assuming a model VRAM requirement on the runner. v1.64.1 advanced the Debian snapshot for Chromium, krb5, and linux-libc-dev security fixes and refreshed the server idle timer during active runs. v1.66.0 fixed conversation condensation so it does not execute actions awaiting confirmation, a behavior worth regression-testing when integrating approval flows.
Platform teams embedding coding agents into internal developer tools, CI maintenance, or custom interfaces, with a choice of local and ephemeral remote execution.
You need a turnkey scheduler and run-history UI, require offline inference out of the box, or only want an interactive coding CLI.
Quick Start & Installation
import os from openhands.sdk import LLM, Agent, Conversation, Tool from openhands.tools.file_editor import FileEditorTool from openhands.tools.task_tracker import TaskTrackerTool from openhands.tools.terminal import TerminalTool llm = LLM( model="gpt-5.5", api_key=os.getenv("LLM_API_KEY"), ) agent = Agent( llm=llm, tools=[ Tool(name=TerminalTool.name), Tool(name=FileEditorTool.name), Tool(name=TaskTrackerTool.name), ], ) cwd = os.getcwd() conversation = Conversation(agent=agent, workspace=cwd) conversation.send_message("Write 3 facts about the current project into FACTS.txt.") conversation.run() print("All done!")
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| software-agent-sdk ★ | 1.4k | +17 | Python | MIT | Python SDK and remote runtime for agents that work on code |
| browser-use | 122.7k | +477 | Python | MIT | Python REPL and CDP for adaptive browser automation |
| langchain | 150.4k | +299 | Python | MIT | Modular Python framework for building agents across model providers |
| agentscope | 37.2k | +342 | Python | Apache-2.0 | Python ReAct SDK and FastAPI service for observable, interruptible agent workflo |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/OpenHands/software-agent-sdk.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about software-agent-sdk
Should I embed the Python SDK or integrate through Agent Server?
Does the execution host need a GPU, and how should I size it?
LLM_API_KEY and does not load model weights in the SDK process, so that integration does not imply a local GPU or VRAM requirement. Size the execution host for concurrent workspaces, repository size, and the CPU, memory, and disk demands of builds and tests. There is no verified minimum hardware profile or offline inference configuration.Can we use it commercially and self-host the execution layer?
When is this a better fit than a general agent framework or a coding CLI?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy