OpenHands Software Agent SDK

Build code-working agents in Python, TypeScript or REST, running in your local workspace or an ephemeral container sandbox.

Stars
★ 1.4k
Last updated
today
FARS reviewed
Dec 03, 2026
License
MIT
Primary language
Python

At a glance

How it runs
Library / SDKFrameworkSelf-hosted service
Works with
Universal · cross-platformOpenAI API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
PythonLLM API keyDocker or Kubernetes (optional, for ephemeral workspaces)Shell / CLINetwork accessLocal filesystem
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

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.

  1. Engineering teams embedding a command-running, file-editing agent capability inside their own product
  2. Repository maintainers delegating routine maintenance such as dependency bumps or README generation
  3. Project groups orchestrating multi-agent refactors and rewrites on one shared Conversation/Tool abstraction
  4. Frontend teams driving a remote Agent Server from a browser app through the typed TypeScript client
  5. DevOps engineers running code agents inside CI as GitHub workflows
  6. 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 build

That 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)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • 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
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Major gaps
49/ 100 5-point scale 2.5 / 5
Trust 12/29
Reliability 6/14
Adaptability 10/18
Convention 10/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust12 / 29 · 2.1/5

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.

Reliability6 / 14 · 2.1/5

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.

Adaptability10 / 18 · 2.8/5

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.

Convention10 / 18 · 2.8/5

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.

Effectiveness7 / 13 · 2.7/5

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.

Verifiability4 / 8 · 2.5/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Dec 03, 2026 Reviewed revision 083399c021bb
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/software-agent-sdk.svg)](https://followagents.com/en/agents/software-agent-sdk)
<a href="https://followagents.com/en/agents/software-agent-sdk"><img src="https://followagents.com/badge/software-agent-sdk.svg" alt="FARS review"></a>

FAQ

Must agents run inside Docker or Kubernetes?
No. The Quick Start passes workspace=cwd, so the agent operates directly on your local directory. Ephemeral Docker/Kubernetes workspaces are an optional isolation mode delivered through the Agent Server.
Which models does it support?
The LLM class takes a model name plus api_key; the README example uses model="gpt-5.5" reading LLM_API_KEY from the environment. The README does not enumerate other provider adapters, so check the LLM configuration pages at docs.openhands.dev.
How does this repo relate to OpenHands/automation and Agent Canvas?
This repo owns the canonical Python SDK and Agent Server implementation plus the browser-compatible TypeScript client, covering agents, tools, conversations, workspaces, events and the REST/WebSocket API. automation owns scheduling, webhooks, run history and dispatching; Agent Canvas owns the UI and consumes the TypeScript client.
Can the agent run in the browser?
The browser side uses clients/typescript, a typed client generated from the Agent Server's OpenAPI contract, talking to the backend over REST/WebSocket. Tool execution happens in the server or local workspace, not inside the browser.
How do agents pick up current uv or deno package guidance?
Enable AgentContext(load_public_skills=True). The default OpenHands/extensions marketplace includes uv and deno skills, and agents adopt them when a repository shows markers such as uv.lock, deno.json, deno.jsonc or deno.lock.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts