Overview of HUD SDK module roles
mainThe SDK is split into two halves that communicate via a wire protocol: one half declares and serves an environment, while the other places and drives it. The only data that crosses between them at rest is a Task row, and they connect at runtime via a TCP control channel.
Core Modules
| Module | Role |
|---|---|
hud/environment/env.py | The Environment declaration (capabilities, task templates, lifecycle hooks). Pure data, no runtime state. |
hud/environment/server.py | Implements the declaration on the wire using a JSON-RPC control channel and per-task suspended generators. |
hud/eval/task.py | Defines the Task row (env name, task id, bound args) using Pydantic. |
hud/eval/runtime.py | Handles placement via the Provider contract and built-in runtimes (e.g., LocalRuntime, DockerRuntime). |
hud/eval/run.py | Contains the rollout atom and the Run handle for driving a single task to a graded result. |
hud/eval/taskset.py | The scheduler: expands tasks, resolves placement, and gathers rollouts into a Job. |
hud/clients/client.py | Provides connect and HudClient (the client-side protocol and capability tunneling). |
hud/agents/base.py | Defines the Agent contract via async __call__(run). |