hud-evals/hud-python
关于
RL environments + evals for AI agents. Define once, train anything.
人工智能与机器学习可以做什么
- ssh - Shell + files in a sandboxed workspace (env.workspace(root))
- mcp - Tools over the Model Context Protocol
- cdp - Browser control over the Chrome DevTools Protocol
- rfb - Full computer-use over VNC: screen + keyboard/mouse
实测星标增长
- 24小时
- +1
- 7天
- +4
- 15天
- +10
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文HUD is a platform for building RL environments for AI agents, across coding, browser, and computer-use. Define an environment, write tasks, and run them as evals across any model, at any scale.
To learn more, see the documentation and environment reference.
Install
# Install the CLI (recommended)
uv tool install hud --python 3.12
# …or as a library
pip install hud
Previously published as
hud-python. The import and CLI names are unchanged. If you havehud-pythoninstalled, migrate withpip uninstall -y hud-python hud && pip install hud(uninstalling both first avoids the two packages clobbering each other's files), and replacehud-pythonwithhudin requirements files and CI configs.
Get your API key at hud.ai/project/api-keys and set it:
hud set HUD_API_KEY=your-key-here
# or: export HUD_API_KEY=your-key-here
Then start from the coding environment, or choose another example environment:
hud init my-env
hud init my-desktop-env --template cua
hud init my-custom-env --template blank

The protocol
HUD is protocol-first. An agent and an environment exchange just two things: tasks.setup, which returns the prompt and the run's capabilities, and tasks.grade, which returns the reward. In between, the agent just works, driving the capabilities itself. The environment's manifest (its tasks and capabilities) is readable on its own, for introspection. HUD owns only that thin envelope, so any model or harness plugs into any environment.
sequenceDiagram
participant Agent
participant Env as Environment
participant Caps as Capabilities (ssh · mcp · cdp · rfb)
Note over Env,Caps: environment holds & serves these
Agent->>Env: hello
Env-->>Agent: session id
Agent->>Env: tasks.setup
Env-->>Agent: prompt + capabilities
rect rgb(238,238,238)
Note over Agent,Caps: the agent works, driving capabilities directly
Agent->>Caps: shell · browser · GUI · tools
Caps-->>Agent: results
end
Agent->>Env: tasks.grade
Env-->>Agent: reward
Because the protocol only exposes capabilities (never a fixed agent), an environment outlives any single harness: new harnesses and models keep running against the same environments, benchmarks, and tasks.
Package & run anywhere
A built image is the end product for your tasks: one build packs every task from a single definition. The recommended path is hud deploy, which builds and registers your environment on HUD in one step; then sync a taskset and run remotely:
hud deploy
hud sync tasks my-taskset
hud eval my-taskset --runtime hosted
Environments & templates
A template is an async generator registered with @env.template(): yield a prompt, receive the agent's answer, yield a reward. Calling the template mints a runnable Task; one function spans a whole dataset of variants. The simplest needs no capabilities — just a prompt and a grader:
from hud import Environment
env = Environment(name="letter-count")
@env.template()
async def count_letter(word: str = "strawberry", letter: str = "r"):
answer = yield f"How many '{letter}'s are in '{word}'? Reply with just the number."
yield 1.0 if (answer or "").strip() == str(word.count(letter)) else 0.0
tasks = [count_letter(word=w) for w in ("strawberry", "raspberry", "blueberry")]
Run it immediately against any model:
hud eval tasks.py claude --group 3
Each graded evaluation is a trace (the SDK's live handle is a Run). With HUD_API_KEY set, every rollout is recorded on hud.ai. Tasks that need a shell, browser, or GUI declare capabilities (below); everything else — variants, grading, batching — stays identical.
→ Quickstart · Tasks & tasksets
Capabilities & harnesses
A capability is a connection the environment exposes; a harness attaches its own tools to it. The same environment serves a one-shot Q&A or a full computer-use rollout, depending on which capabilities the harness opens.
| Protocol | What it exposes |
|---|---|
ssh |
Shell + files in a sandboxed workspace (env.workspace(root)) |
mcp |
Tools over the Model Context Protocol |
cdp |
Browser control over the Chrome DevTools Protocol |
rfb |
Full computer-use over VNC: screen + keyboard/mouse |
Ships natively: Claude Code, Codex, and Pi (any OpenAI-compatible endpoint) via create_agent("claude-sonnet-4-5") (or gpt-…). Each runs its CLI in the environment's ssh workspace.
Bring your own: a harness attaches to a capability and defines a tool spec — wrap browser-use on cdp, or your own agent on ssh / mcp. No protocol work required.
→ Capabilities · Models
Deploy on the platform
From the platform UI you can run batches, compare models on the same taskset, and inspect every trace.
Links
Enterprise
Building agents at scale? We work with teams on custom environments and benchmarks.
📅 Book a call · 📧 [email protected]
Contributing
We welcome contributions! See CONTRIBUTING.md.
Key areas: Agents · Environments · Capabilities · Eval · Runtimes · Integrations
Citation
@software{hud2025agentevalplatform,
author = {HUD and Jay Ram and Lorenss Martinsons and Parth Patel and Govind Pimpale and Dylan Bowman and Jaideep Chawla and Nguyen Nhat Minh},
title = {HUD: An Evaluation and RL Environments Platform for Agents},
date = {2025-04},
url = {https://github.com/hud-evals/hud-python},
langid = {en}
}
MIT License · LICENSE
探索相关项目
加载中…