> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Build with the SDK

> Write environments and tasks in Python, run them locally or on HUD, and use the platform to review, share, and train on the results.

For RL researchers and engineers who want full control. With the
[HUD SDK](/v6/start/overview) you write the environment, its task templates, and their graders in
Python, run them locally while you iterate, and then deploy them so HUD runs them at scale. With
`HUD_API_KEY` set, every run, local or hosted, is a trace on the platform, where the rest of your
team can read, review, and build on it.

## From code to platform

<Steps>
  <Step title="Write an environment">
    Start from a template with `hud init`, then define task templates and how they are graded. See
    [creating an environment](/v6/guides/creating-an-environment).
  </Step>

  <Step title="Run it locally">
    `hud eval tasks.py claude` runs your tasks on your machine. With `HUD_API_KEY` set, the agent
    calls models through HUD's gateway and each run appears as a trace on the platform. These calls
    count toward the [per-minute limit on model calls](/platform/limits#model-calls). See the
    [SDK quickstart](/v6/start/quickstart).
  </Step>

  <Step title="Deploy it">
    `hud deploy` builds the environment on HUD. Its templates appear on the platform, ready for
    tasks. See [environments](/platform/environments).
  </Step>

  <Step title="Sync your tasks">
    `hud sync tasks` creates or updates a taskset from tasks defined in code. See
    [`hud sync`](/v6/reference/cli#hud-sync).
  </Step>

  <Step title="Run at scale">
    `hud eval "My Taskset" claude --group 3` runs the synced taskset on HUD, with the agent and the
    environment both hosted, three times per task. Starting a job from the web app does the same.
    See [running a deployed environment](/v6/guides/running-an-eval#running-a-deployed-environment).
  </Step>

  <Step title="Review and train">
    Review the traces with [QA agents](/platform/qa-agents), from the web app or with `hud qa`, and
    [train a model](/platform/training) on the taskset.
  </Step>
</Steps>

## What the platform adds

| You get | Where |
| - | - |
| Hosted runs on EC2 or Modal, with GPUs on Modal | [Hosted compute](/platform/environments#choose-hosted-compute) |
| Every model through one API key, or your own provider keys | [Models](/platform/models), [provider keys](/platform/credentials#bring-your-own-provider-keys) |
| Replays of every step, with file diffs and screenshots | [Traces](/platform/traces), [file tracking](/platform/file-tracking) |
| QA agents that check rewards for hacking and grader mistakes | [QA agents](/platform/qa-agents) |
| Tasks that domain experts can edit in the web app | [Make a template editable](/platform/create-tasks#make-a-template-editable-in-the-web-app) |
| Review workflow and scoped access for many authors | [Task lifecycle](/platform/task-lifecycle), [projects](/platform/projects) |
| Leaderboards and shared benchmarks | [Publish a taskset](/platform/tasksets#publish-a-taskset) |
| Automation over HTTP or MCP | [REST API](/platform/rest-api), [Platform MCP](/platform/mcp) |

Commands that create platform resources, such as `hud deploy`, `hud sync tasks`, and
`hud harbor import`, use your current [project](/platform/projects). Choose it with
[`hud project`](/v6/reference/cli#hud-project).

<Columns cols={3}>
  <Card title="SDK quickstart" icon="rocket" href="/v6/start/quickstart">
    Install the SDK and run a first environment.
  </Card>

  <Card title="CLI reference" icon="terminal" href="/v6/reference/cli">
    Every `hud` command and flag.
  </Card>

  <Card title="Training agents" icon="graduation-cap" href="/v6/guides/training-agents">
    Fork a model and train it on your tasks.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.