OpenHands Software Agent SDK is a clean, modular SDK for building AI agents based on OpenHands V1. It provides Python, TypeScript, and REST APIs, aimed at agent development that "works with code."
Uses
- One-off tasks, such as generating a README for your repository.
- Routine maintenance tasks, such as updating dependencies.
- Major tasks involving multiple agents, such as refactoring and rewriting.
- Building new developer experiences: this SDK is the engine behind the OpenHands CLI and OpenHands Cloud.
Key capabilities
- Provides Python, TypeScript, and REST APIs.
- Agents can use the local machine as a workspace, or run in ephemeral workspaces (such as Docker or Kubernetes) through the Agent Server.
- Repository management agents, tools, sessions, workspaces, events, REST/WebSocket APIs, and typed client access to that API.
- Includes the Agent Server implementation and a browser-compatible TypeScript client.
- Supports public skill loading: when enabled through AgentContext(load_public_skills=True), the default OpenHands/extensions marketplace includes skills such as uv and deno; for repositories marked with uv.lock, deno.json, deno.jsonc, or deno.lock, agents can automatically obtain the latest package management guidance.
Usage
- Refer to the examples in the repository's examples/ directory: standalone SDK (examples/01_standalone_sdk/) covers basic agent usage, custom tools, and core workflows; remote Agent Server (examples/02_remote_agent_server/) covers client-server architecture and WebSocket connections; GitHub workflows (examples/03_github_workflows/) covers CI/CD integration and automation workflows; skills and plugins (examples/05_skills_and_plugins/) covers AgentSkills, plugins, and marketplace examples.
- examples/01_standalone_sdk/03_activate_skill.py is a minimal example of enabling public skill loading.
- Installation instructions and detailed setup are in the Getting Started Guide; for local development from this repository, run make build to install workspace dependencies and pre-commit hooks.
- Detailed documentation, tutorials, and API references are in https://docs.openhands.dev/sdk,包含:入门指南(安装与设置)、架构与核心概念(智能体、工具、工作区等)、指南(Hello World, custom tools, MCP, skills, etc.), Agent Server API reference (REST API reference for the remote agent server).
Applicable scenarios and boundaries
- Part of the OpenHands ecosystem: OpenHands/OpenHands consumes the TypeScript client as Agent Canvas; OpenHands/automation handles scheduling, webhooks, run history, and distribution; the SDK/Agent Server executes sessions distributed by automation.
- The typical flow is: SDK/Agent Server → OpenAPI contract → clients/typescript → Agent Canvas. Backend behavior and endpoints belong to the Python SDK or Agent Server package; browser-compatible client access belongs to clients/typescript; the UI is in Agent Canvas; automation lifecycle behavior is in automation.
Limitations
- The materials do not provide specific information such as fees, pricing, or platform compatibility.
- More detailed development setup, testing, and contribution guidelines are in DEVELOPMENT.md.
- You can join the OpenHands community through Slack; the GitHub repository provides source code and issues, and the documentation provides complete instructions.