OpenHands Software Agent SDK
Build code-working agents in Python, TypeScript or REST, running in your local workspace or an ephemeral container sandbox.
- Source repo
- OpenHands/software-agent-sdk
- Stars
- ★ 1.4k
- Last updated
- today
- FARS reviewed
- Dec 03, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 49/100 · Major gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformOpenAI API
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- Engineering teams embedding a command-running, file-editing agent capability inside their own product
- Not a fit if
- Teams that want a ready-made chat product instead of an SDK they code against
- Users who only work through a GUI; every documented entry point is Python, TypeScript or REST
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-03
- Source review
- 49/100 · Major gaps
What does this agent do, and when should you use it?
The OpenHands Software Agent SDK is an MIT-licensed toolkit for building agents that work with code. One repository ships three surfaces: the canonical Python SDK, a browser-compatible TypeScript client under clients/typescript, and an Agent Server that exposes a REST/WebSocket API plus an OpenAPI contract. An agent is assembled from an LLM, a list of tools (TerminalTool, FileEditorTool, TaskTrackerTool and others) and a Conversation bound to a workspace — either a local directory or an ephemeral Docker/Kubernetes environment managed by the Agent Server. The same engine powers the OpenHands CLI and OpenHands Cloud, and the README badges cite a SWEBench score of 77.6. Repository boundaries are stated explicitly: scheduling, webhooks and run history belong to OpenHands/automation, UI belongs to Agent Canvas, and this repo executes the conversations dispatched to it.
You import LLM, Agent, Conversation and Tool from openhands.sdk, configure LLM(model=..., api_key=...) with your model and key, and give Agent a tools list built from named tools such as TerminalTool, FileEditorTool and TaskTrackerTool. Conversation(agent=agent, workspace=cwd) pins that agent to a directory; conversation.send_message() issues a natural-language instruction and conversation.run() executes the loop, during which the agent runs terminal commands, edits files, tracks tasks and leaves results in the workspace. For isolation, the same conversation can be handed to the Agent Server, which serves REST and WebSocket endpoints and publishes an OpenAPI contract that generates the clients/typescript client, so a browser-side app gets typed access to the running agent. The examples/ directory is organized into standalone SDK, remote agent server, GitHub workflows, and skills and plugins; enabling AgentContext(load_public_skills=True) pulls public skills such as uv and deno from the OpenHands/extensions marketplace when it detects markers like uv.lock or deno.json.
- Engineering teams embedding a command-running, file-editing agent capability inside their own product
- Repository maintainers delegating routine maintenance such as dependency bumps or README generation
- Project groups orchestrating multi-agent refactors and rewrites on one shared Conversation/Tool abstraction
- Frontend teams driving a remote Agent Server from a browser app through the typed TypeScript client
- DevOps engineers running code agents inside CI as GitHub workflows
- Agent researchers who want a reproducible Python framework for comparing tools and prompting strategies
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Environment variables
LLM_API_KEY- Install notes cover
- Docker
How do you install or deploy this agent?
The README does not state a published package name or a pip/npm install command; installation instructions are delegated to the external Getting Started guide (https://docs.openhands.dev/sdk/getting-started). For local development from this repository, the README gives exactly one command:
make buildThat installs the workspace dependencies and pre-commit hooks. You also need model credentials before the first run — the example reads an environment variable:
export LLM_API_KEY=<your-api-key>Running inside ephemeral Docker or Kubernetes workspaces additionally requires deploying the Agent Server and a container runtime; those steps live in the Getting Started guide and the Agent Server API Reference rather than in this README.
How do you use this agent?
The README Quick Start is the shortest working program (after dependencies are installed and LLM_API_KEY is set):
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!")For more, examples/ splits into 01_standalone_sdk (core usage and custom tools), 02_remote_agent_server (client-server and WebSocket), 03_github_workflows (CI/CD), and 05_skills_and_plugins (AgentSkills and marketplace); the minimal public-skill example is examples/01_standalone_sdk/03_activate_skill.py.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- One repository covers the Python SDK, the TypeScript client and the Agent Server, glued by an explicit OpenAPI contract (SDK/Agent Server → OpenAPI → clients/typescript → Agent Canvas), so backend and browser do not drift into separate protocols
- Execution location is a choice, not a constraint: workspace can be a local directory or an ephemeral Docker/Kubernetes workspace managed by the Agent Server, with the same Agent code
- Tools are named, swappable components (TerminalTool, FileEditorTool, TaskTrackerTool) with documented examples for custom tools, MCP and skills/plugins plus the OpenHands/extensions marketplace
- Scope discipline is unusually clear: scheduling, webhooks and run history are explicitly pushed to OpenHands/automation instead of being absorbed into the SDK
- MIT licensed, backed by an arXiv tech report (2511.03690) and a publicly badged SWEBench score of 77.6, which makes technical evaluation easier
- The README gives no package name or install command, only a link to the external Getting Started guide — the fastest path to a first run goes through documentation outside the repo
- Isolated execution is not a package install: ephemeral Docker/Kubernetes workspaces require deploying the Agent Server and container infrastructure
- A full production setup spans several repositories (software-agent-sdk, automation, Agent Canvas, OpenHands-CLI), so self-hosting means coordinating versions across projects
- The sample code assumes you already have an external LLM API key; no local-model or offline inference path is shown in the README
- Authoritative docs and examples live on docs.openhands.dev, so air-gapped or intranet-only readers only get jump links from the repository
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| OpenHands Software Agent SDK This agent | 49 · Major gaps | Library / SDKFree + model costs | ★ 1.4k | today | Python | OpenAI API |
| Daytona: Secure Elastic Infrastructure for AI Code | 45 · Major gaps | Library / SDKFreemium | ★ 71k | 4mo ago | — | — |
| Donggua's AI Learning Notes: In-depth Pi-Agent SDK Tutorial | 49 · Major gaps | Web appFree | ★ 3.8k | 3mo ago | MDX | — |
| DM-Code-Agent | 76 · Good | CLIFree + model costs | ★ 152 | 19d ago | Python | OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
The evidence shows confirmation policies, security analyzers, SecretRegistry, pydantic_secrets guidance, session API keys with a wildcard-bind guard, and dependency constraints. However, the README quick start enables Terminal/FileEditor by default without showing a confirmation policy, sensitive-data handling is mostly asserted through guidance rather than visible implementation, rollback appears only as a review requirement, and external effects are the core capability without default gating. Therefore least_privilege, user_confirmation, data_flow_transparency, sensitive_data_handling, external_effects, and rollback each score 1. dependency_security scores 2 because of the 7-day exclusion and CVE-driven minimum version constraints. source_attribution scores 2 for MIT, paper citation, and contributor links.
README, AGENTS.md, pyproject.toml, and TypeScript exports are consistent on architecture and boundaries, so self_consistency scores 2. For dependency availability there is a uv workspace, constraint dependencies, and a new-package exclusion policy, but no lockfile is shown and subpackage dependencies are not fully visible, so dependency_availability scores 1. Failure messages include logging, warnings, and ImportError raising, but there is no systematic user-facing failure taxonomy, so failure_messages scores 1.
README clearly covers one-off tasks, maintenance tasks, multi-agent refactors, and local or ephemeral workspaces, so audience_and_scenarios scores 2. Repository boundaries and cross-repo responsibilities are clear in README and AGENTS.md, so capability_boundaries scores 2. Skill files include trigger descriptions, but product-level trigger precision is not sufficiently evidenced, so trigger_precision scores 1. Python, TypeScript, Docker/K8s, and multi-platform binaries are supported, so environment_fit scores 2.
README is well structured and links documentation, examples, and community resources, so information_architecture scores 2. Installation notes mostly link to Getting Started and only show make build, so install_notes scores 1. AGENTS.md emphasizes backward compatibility, deprecation policy, and schema-version migration, so naming_stability scores 2. The examples directory and quick-start example are adequate, so examples_and_faq scores 2. Known limitations are scattered across skills and AGENTS.md without a consolidated statement, so known_limitations scores 1. LICENSE contains the full MIT text, so license scores 3. Release workflow documentation is detailed, but no CHANGELOG is shown, so versioning_changelog scores 1. Maintenance responsibility has community and contribution notes but no explicit maintainer list, so maintenance_responsibility scores 1.
The SDK provides a runnable quick start, examples directory, and Python/TypeScript/REST APIs, so output_usability scores 2. As a composable agent framework with tools, workspaces, events, and an Agent Server, marginal_value scores 2. Cost-benefit requires LLM API keys and infrastructure, and the repository provides no cost analysis or resource estimates, so cost_benefit scores 1.
Performance claims such as SWE-bench 77.6 point to external spreadsheets and a paper, with no corresponding reproducible evidence in the repository, so claim_traceability scores 1. README, AGENTS.md, pyproject.toml, and TypeScript exports corroborate architecture and boundaries, so cross_source_corroboration scores 2. The documentation mixes facts, normative requirements, and inferential statements, so fact_inference_separation scores 1.
- The default quick start enables terminal and file-editing tools without showing a confirmation policy; configure confirmation and security analysis explicitly before production use.
- The Agent Server may lack authentication when no session API key is configured; the wildcard-bind guard is mentioned in code comments, but the full implementation is not shown in the sample.
- Dependency security constraints are concentrated in the root pyproject.toml; subpackage dependencies and lockfiles are not fully shown, so this cannot establish that all dependencies are audited.
- Publisher identity is unverified; maintenance responsibility and update paths require external confirmation.
- Benchmark scores and performance claims in README rely on external links, with no reproducible evidence in the repository.
- Installation notes mostly link to an external documentation site; complete local setup and troubleshooting steps are not in the repository.
FAQ
Must agents run inside Docker or Kubernetes?
Which models does it support?
How does this repo relate to OpenHands/automation and Agent Canvas?
Can the agent run in the browser?
How do agents pick up current uv or deno package guidance?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.