Metadata-Version: 2.4
Name: hud-python
Version: 0.1.4
Summary: SDK for the HUD evaluation platform.
Project-URL: Homepage, https://github.com/Human-Data/hud-sdk
Project-URL: Bug Tracker, https://github.com/Human-Data/hud-sdk/issues
Project-URL: Documentation, https://hud.so
Author-email: Human Union Data SDK <founders@hud.so>
License: MIT License
        
        Copyright (c) 2025 Human Data Company
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.9
Requires-Dist: eval-type-backport>=0.2.2
Requires-Dist: httpx<1,>=0.23.0
Requires-Dist: pillow<12,>=11
Requires-Dist: pydantic-settings<3,>=2
Requires-Dist: pydantic<3,>=2
Provides-Extra: dev
Requires-Dist: anthropic; extra == 'dev'
Requires-Dist: dotenv; extra == 'dev'
Requires-Dist: ipykernel; extra == 'dev'
Requires-Dist: ipython<9; extra == 'dev'
Requires-Dist: jupyter-client; extra == 'dev'
Requires-Dist: jupyter-core; extra == 'dev'
Requires-Dist: openai; extra == 'dev'
Requires-Dist: pyright==1.1.364; extra == 'dev'
Requires-Dist: pytest<9,>=8.1.1; extra == 'dev'
Requires-Dist: ruff==0.9.8; extra == 'dev'
Description-Content-Type: text/markdown

# HUD

A Python SDK for interacting with HUD environments and evaluation benchmarks for browser use and computer use models.

> **Alpha Release Notice**: This SDK is currently in early release status. The API is evolving and may change in future releases as we gather feedback and improve functionality.

[![PyPI version](https://img.shields.io/pypi/v/hud-python)](https://pypi.org/project/hud-python/)

[📚 Documentation](https://documentation.hud.so) | [🏠 Homepage](https://hud.so)


## Quick start

[RECOMMENDED] To set get started with an agent, see the [Claude Computer use example](https://github.com/Human-Data/hud-sdk/tree/main/examples).

Install the package with Python>=3.9:
```bash
pip install hud-python
```

Make sure to setup your account with us (email founders@hud.so) and add your API key to the environment variables:
```bash
HUD_API_KEY=<your-api-key>
```

Load in your agent and create a run! Go to the [examples](https://github.com/Human-Data/hud-sdk/tree/main/examples) folder for more examples.
```python
import asyncio
from hud import HUDClient

async def main():
    # Initialize client with API key
    client = HUDClient(api_key=os.getenv("HUD_API_KEY"))
    
    # Load a gym and evaluation set
    gym = await client.load_gym(id="OSWorld-Ubuntu")
    evalset = await client.load_evalset(id="OSWorld-Ubuntu")
    
    # Create a run and environment
    run = await client.create_run(name="example-run", gym=gym, evalset=evalset)
    env = await run.make(metadata={"agent_id": "OSWORLD-1"})
    await env.wait_for_ready()
    
    ### 
    ### Agent loop goes here, see example in /examples
    ###

    # Evaluate the environment
    result = await env.evaluate()

    # Close the environment when done
    await env.close()

    # Get analytics for the run such as rewards, task completions, etc.
    analytics = await run.get_analytics()
    print(analytics)

if __name__ == "__main__":
    asyncio.run(main())
```

## Documentation

For comprehensive guides, examples, and API reference, visit [our docs](https://docs.hud.so/introduction)

## License

[MIT License](LICENSE)
