skillfed

openhands-sdk

OpenHands SDK - Core functionality for building AI agents

openhands-sdk v1.42.1 12.2M downloads/30d#1,336 on PyPI987
License unclear Active released

What it is and what it does

OpenHands SDK is a framework for building AI agents that interact with code and development tasks. It provides a Python API to define agents, attach tools (like terminal, file editor, and task tracker), connect them to LLMs, and orchestrate conversations where the agent receives instructions and executes code-related work. Agents can run locally on your machine or in ephemeral Docker/Kubernetes workspaces via the Agent Server, making it suitable for one-off tasks, routine maintenance, and complex multi-agent refactors.

The SDK is built on 18 runtime dependencies including pydantic for data validation, httpx for HTTP communication, litellm for LLM abstraction, and tree-sitter for code parsing. It supports modern Python versions (3.12 or later) and is actively maintained. The framework is designed to be extensible—you can build custom tools, load public skills from a marketplace, and integrate it into CI/CD pipelines or custom developer experiences.

Use it for:

  • Automate one-off development tasks like generating README files or documentation for a repository.
  • Run routine maintenance workflows such as dependency updates or code refactoring across multiple files.
  • Build multi-agent systems that collaborate on large tasks like full codebase rewrites or architectural changes.
  • Integrate agentic capabilities into CI/CD pipelines via GitHub Actions or similar workflow systems.
  • Create custom developer tools or CLIs that leverage agent-driven code analysis and generation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

OpenHands SDK provides Python and REST APIs for building software agents that can work with code, execute tasks locally or in ephemeral workspaces, and integrate with LLMs to perform development workflows.

Yes, with conditions. The SDK is actively maintained, has low install friction, and addresses a real need for code-working agents. However, the unclear license status requires verification before production use. If you need to build agents that interact with code, execute tasks autonomously, and integrate with LLMs, this is a solid choice—but confirm licensing terms first and ensure Python 3.12 or later is available in your environment.

Install

openhands-sdk on PyPI

pip

pip install openhands-sdk

uv

uv add openhands-sdk

poetry

poetry add openhands-sdk

Installing openhands-sdk

Before you install

Low install friction with a pure Python wheel. Active maintenance with a release 2 days old and 987 repository stars. Requires Python 3.12 or later. The 18 runtime dependencies include established packages like pydantic, httpx, and litellm, suggesting a mature dependency ecosystem.

License in practice

License treatment is unclear—no SPDX identifier or raw license text is available in the package metadata. Before production use, verify the actual license terms in the repository or documentation.

Quickstart

pip install openhands-sdk

from openhands.sdk import LLM, Agent, Conversation, Tool
from openhands.tools.terminal import TerminalTool

llm = LLM(model="gpt-5.5", api_key="your-key")
agent = Agent(llm=llm, tools=[Tool(name=TerminalTool.name)])
conversation = Conversation(agent=agent, workspace=".")
conversation.send_message("List files in the current directory")
conversation.run()

Requires Python 3.12 or later. LLM API credentials must be provided for the agent to function.

Verify before relying

  • Whether the unclear license permits commercial use or has specific attribution requirements.
  • Performance characteristics and latency when running agents against large codebases.
  • Compatibility with specific LLM providers beyond the example shown.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.12)
Install friction low — pure-Python wheel
Runtime dependencies 18 — agent-client-protocol, deprecation, fakeredis, fastmcp, filelock, httpx, jsonschema, joserfc, litellm, pillow, pydantic, python-frontmatter, python-json-logger, tenacity, websockets, lmnr, tree-sitter, tree-sitter-bash
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 12,200,524/month — #1,336 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: openhands_sdk-1.42.1-py3-none-any.whl

Tags

ai agent framework for codellm-powered developer agent sdkautonomous code execution agentsoftware agent api pythonagent server workspace frameworkcode task automation sdkagentic ai development tools
ai-agent-frameworkllm-integrationcode-automation

More Application Frameworks packages