Install the HUD SDK using pip:

# Install the latest stable release
pip install hud-python

# Install the latest release (may include breaking changes)
pip install --pre hud-python

Requirements

  • Python: 3.10 or higher
  • API Keys:
    • HUD API Key (required)
    • OpenAI API Key (optional, for OperatorAgent)
    • Anthropic API Key (optional, for ClaudeAgent)

Environment Setup

The SDK automatically loads API keys from environment variables or a .env file in your project root.

Create a .env file in your project root with your keys:

# .env file
HUD_API_KEY=your_hud_api_key_here
OPENAI_API_KEY=your_openai_api_key_here  # Optional
ANTHROPIC_API_KEY=your_anthropic_api_key_here # Optional

Alternatively, set them as environment variables.

Development Installation

If you want to contribute to the SDK or install it in development mode:

# Clone the repository
git clone https://github.com/humanuniondata/hud-python.git
cd hud-python

# Create and activate a virtual environment (using uv is recommended)
uv venv
source .venv/bin/activate  # Or use the activate script for your shell

# Install in development mode (includes dev dependencies)
pip install -e ".[dev]"

Verification

To verify your installation and setup, try running the example code in the Quickstart Guide.