openhands-agent-server
OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
What it is and what it does
OpenHands Agent Server is a Python package that exposes AI agents capable of working with code through REST and WebSocket APIs. It builds on the openhands-sdk to let you run agents remotely, either on the local machine or in ephemeral Docker/Kubernetes workspaces. The server handles agent lifecycle, tool execution (file editing, terminal commands, task tracking), and workspace management.
You use it to automate code-related tasks—writing documentation, updating dependencies, refactoring—by sending natural-language instructions to an agent that can read files, run commands, and track progress. The package includes fastapi for the HTTP layer, sqlalchemy for state persistence, and integrates with openai for LLM inference. It's designed both as a standalone service and as the backbone for higher-level tools like the OpenHands CLI and Cloud platform.
Use it for:
- Run an AI agent as a remote service to handle one-off code tasks like generating README files or documentation
- Automate routine maintenance workflows such as dependency updates across multiple repositories
- Execute complex multi-agent refactoring or rewrite tasks in isolated, ephemeral Docker containers
- Build custom developer tools or CI/CD integrations that delegate code work to AI agents via REST
- Deploy agents in Kubernetes for scalable, on-demand code automation in production environments
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a REST and WebSocket API server for running OpenHands AI agents that can work with code, either locally or in ephemeral containerized workspaces.
Yes, if you need a production-ready agent server for code automation. The package is actively maintained, has low install friction, and sits in the top 5000 PyPI packages by download volume. The main caveat is the unclear license—verify it matches your use case before committing. Requires Python 3.12 or later.
Install
openhands-agent-server on PyPI
pip
pip install openhands-agent-serveruv
uv add openhands-agent-serverpoetry
poetry add openhands-agent-serverInstalling openhands-agent-server
Before you install
Low friction: pure Python wheel with 11 runtime dependencies including fastapi, sqlalchemy, and docker. Active maintenance with a release 2 days old and recent commits. Requires Python 3.12 or later.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before using in proprietary or restricted contexts.
Quickstart
pip install openhands-agent-server
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. Docker is a runtime dependency if you plan to use containerized workspaces.
Verify before relying
- Whether the package can be used standalone or requires additional OpenHands components to function
- Specific LLM models and API providers supported beyond the example
- Performance characteristics and scalability limits for concurrent agent sessions
- Whether public skills marketplace requires network access or authentication
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — aiosqlite, alembic, docker, fastapi, openhands-sdk, openai, pydantic, sqlalchemy, uvicorn, websockets, wsproto |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,416,943/month — #3,931 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openhands_agent_server-1.42.1-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
openhandsOpenHands is a CLI tool that runs an AI agent…
permissive · top 5,000 on PyPI
openhands-aiOpenHands is a self-hosted developer control…
permissive · top 5,000 on PyPI
openhands-workspaceProvides Python and REST APIs for building…
unclear · top 15,000 on PyPI
openhands-aciProvides tools and interfaces for AI agents to…
permissive · top 5,000 on PyPI
openhands-sdkOpenHands SDK provides Python and REST APIs for…
unclear · top 5,000 on PyPI
openhands-toolsProvides Python and REST APIs for building AI…
unclear · top 5,000 on PyPI
openvikingOpenViking is a context database for AI agents…
agpl · top 15,000 on PyPI
azure-ai-agentserver-invocationsProvides HTTP and WebSocket invocation protocol…
permissive · top 15,000 on PyPI
deepagents-cliCommand-line tool for scaffolding, configuring,…
permissive · top 15,000 on PyPI
agent-framework-devuiProvides a lightweight web UI and…
permissive · top 15,000 on PyPI