Upgrade boundary
The v6 SDK does not run environments written against the v5 surface. Convert@env.scenario, @env.tool / env.add_tool, env("scenario"), and env.run(...) before upgrading the environment to v6. The removed hud.tools, hud.native, hud.services, and hud.server modules are not importable in v6.
The v6 spec removes most of the tool-wiring boilerplate. The conversion below maps each removed surface to its v6 owner.
At a glance
The CLI you already use is stable:
hud init, hud deploy, hud eval, and hud sync tasks all carry over. Replace hud dev with hud serve.
Walk through a conversion
Here’s a small v5 coding environment - a couple of tools and one scenario:env.py (v5)
1
Replace tools with a capability
This is the biggest change. In v5 you registered tools and the environment forwarded them, translating per provider. In v6 you declare a capability - a connection - and the agent’s harness attaches its own tools to it. Shell and file tools become a Other tool kinds map the same way: a browser becomes
Workspace: the environment starts the sandboxed workspace and publishes its ssh capability when it serves:env.py (v6)
cdp, full computer-use becomes rfb, a robot becomes robot, and any custom MCP tools become an mcp capability via Capability.mcp(name=..., url=...). You no longer hand-wire ComputerTool() / BashTool() or call env.as_claude_tools() - the harness does that.2
Rename @env.scenario to @env.template
The generator body is identical -
yield a prompt, receive the answer, yield a reward. Just swap the decorator and keep a reference to the returned Task:env.py (v6)
@env.template() also accepts id=, description=, and optional input= / returns= types (surfaced as JSON schemas in the manifest). The decorated function is a template that mints Task rows when called. Removed v5 scenario options such as chat, exclude_tools, and allowed_tools have no direct v6 equivalent; express agent and tool policy in the harness that owns it.3
Build tasks by calling the task function
env("fix-tests", target="tests/") becomes a direct call on the task function. It returns a Task - the runnable unit - and .slug / .columns work exactly as before:tasks.py (v6)
4
Run it
Locally, Programmatically, the
hud eval is unchanged:hud.eval(task) context manager and task.run(model) are replaced by handing an agent to the task - it returns a Job holding the graded runs:create_agent routes any model (claude-..., gpt-..., gemini-..., grok-...) through the HUD gateway and wires the tools for whichever capabilities the environment exposes.5
Serve and deploy
v5 served an MCP server via
env.run(transport=...). v6 serves its control channel - use hud serve while iterating and hud deploy to publish (it builds and publishes in one step). await env.serve(host, port) is the in-code equivalent.Converting with an agent
The conversion is mechanical, so the fastest path is to let your coding agent do it. Add the HUD docs to your agent - they’re available as an MCP server atdocs.hud.ai/mcp, or use the Copy / Claude / ChatGPT buttons at the top of any docs page - then point it at this guide and the Environment reference and ask it to adapt your env.py. A prompt like:
Convert this v5 HUD environment to v6 using the migration guide at docs.hud.ai. Rename scenarios to tasks, replace registered tools with the capability they imply (shell/files →Make the conversion while the environment still uses the v5 SDK, then upgrade it to v6 and run its task tests. Old imports and registered tools do not have runtime fallbacks in v6.ssh, browser →cdp, computer-use →rfb, custom tools →mcp), switchenv("name", ...)to calling the task, and fix thehud.toolsimports below.
Imports to update
In v6,hud.tools and the other v5 compatibility modules were removed entirely. Update every old import before upgrading:
The rule of thumb: grading types move to
hud.graders, tools become capabilities, and removed v5 modules must be gone before the v6 upgrade.
Next steps
Environment reference
Define capabilities, lifecycle hooks, and tasks.
Tasks & Tasksets
Define tasks, collect tasksets, and grade runs.
Package & deploy
Publish with hud deploy and run at scale.