# Repository Briefing: OpenHands/software-agent-sdk
> Source: https://repoforai.com/repo/OpenHands/software-agent-sdk (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/OpenHands/software-agent-sdk
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (97/100 · Maintenance 35/35 · Adoption 22/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.66.0 (2026-12-02) — https://github.com/OpenHands/software-agent-sdk/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, API
- **Momentum**: 1,445 ★ total (+4 24h / +17 7d) · 840 forks
- **Topics**: `agent`, `sdk`
- **When to Use**: Best for: Platform teams embedding coding agents into internal developer tools, CI maintenance, or custom interfaces, with a choice of local and ephemeral remote execution. Skip if: You need a turnkey scheduler and run-history UI, require offline inference out of the box, or only want an interactive coding CLI.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Package boundaries: The uv workspace separates the SDK, tools, workspaces, and Agent Server.
- Execution modes: A conversation can target a local directory or run in an ephemeral Docker or Kubernetes workspace through Agent Server.
- Client contract: OpenAPI connects the Python server to a browser-compatible TypeScript client; remote integration uses REST and WebSocket.
- Tooling and extensions: The quickstart combines terminal, file editor, and task tracker tools; examples cover custom tools, AgentSkills, and plugins.
- Dependency controls: The root uv configuration applies a seven-day release age filter with package-specific cutoff dates and sets minimum versions for dependencies including Starlette and aiohttp.
- Confirmation handling: v1.66.0 fixes conversation condensation so it does not run actions that are awaiting confirmation.
```

## Quick Start / Clone
```bash
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!")
```
