The OpenHands SDK is a modular framework for building AI agents that interact with code, files, and system commands. Agents can execute bash commands, edit files, browse the web, and more.Documentation Index
Fetch the complete documentation index at: https://allhandsai-sdk.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Install the uv package manager (version 0.8.13+):Installation
Step 1: Acquire an LLM API Key
The SDK requires an LLM API key from any LiteLLM-supported provider. See our recommended models for best results.Option 1: OpenHands Cloud (Recommended)
Option 1: OpenHands Cloud (Recommended)
Sign up for OpenHands Cloud and get an API key from the API keys page. This gives you access to recommended models with no markup.Learn more →
Option 2: Direct Provider
Option 2: Direct Provider
Get an API key directly from providers like:
Step 2: Install the SDK
Option 1: Install via PyPI
Option 1: Install via PyPI
Option 2: Install from Source
Option 2: Install from Source
Step 3: Run Your First Agent
Here’s a complete example that creates an agent and asks it to perform a simple task:examples/01_standalone_sdk/01_hello_world.py
Core Concepts
Agent: An AI-powered entity that can reason, plan, and execute actions using tools. Tools: Capabilities like executing bash commands, editing files, or browsing the web. Workspace: The execution environment where agents operate (local, Docker, or remote). Conversation: Manages the interaction lifecycle between you and the agent.Basic Workflow
- Configure LLM: Choose model and provide API key
- Create Agent: Use preset or custom configuration
- Add Tools: Enable capabilities (bash, file editing, etc.)
- Start Conversation: Create conversation context
- Send Message: Provide task description
- Run Agent: Agent executes until task completes or stops
- Get Result: Review agent’s output and actions
Try More Examples
The repository includes 24+ examples demonstrating various capabilities:Next Steps
Explore Documentation
- SDK Architecture - Deep dive into components
- Tool Documentation - Available tools
- Workspace Options - Execution environments
Build Custom Solutions
- Custom Tools - Create custom tools to expand agent capabilities
- MCP Integration - Connect to external tools via Model Context Protocol
- Docker Workspaces - Sandbox agent execution in containers
Get Help
- Slack Community - Ask questions and share projects
- GitHub Issues - Report bugs or request features
- Example Directory - Browse working code samples

