Skip to main content
Because the protocol only exposes capabilities, plugging another framework into HUD is a thin adapter — attach to a capability + produce an answer. There’s no protocol work. This page collects the integration points.

Bring your own harness

Any agent framework becomes a HUD harness by subclassing Agent and implementing __call__. Open the capabilities you need off run.client, do your work, and write the answer to run.trace.content:
harness.py
from hud.agents.base import Agent
from hud import Run

class MyHarness(Agent):
    async def __call__(self, run: Run) -> None:
        prompt = run.prompt_text  # or run.prompt_messages for structured turns
        # ... drive your framework against a capability ...
        run.trace.content = "the final answer"
The result is graded on exit like any other run. See the agent contract.

Wrap an existing framework: browser-use on cdp

The bundled BrowserUseAgent is exactly this adapter — browser-use driving the cdp (browser) capability:
run.py
from hud.agents.browser_use import BrowserUseAgent
from hud.agents.types import BrowserUseConfig

agent = BrowserUseAgent(BrowserUseConfig(model="claude-sonnet-4-5", max_steps=25))
job = await my_browser_task().run(agent)
Use it as a template for wrapping other frameworks over whichever capability they need (ssh, mcp, rfb, robot).

Run on your own infra

The other integration seam is placement: a provider is any callable that takes the task row being placed and yields a connectable Runtime. Your cluster, a sandbox vendor, or a per-row GPU policy plugs in without touching the engine:
def placer(task):
    gpus = 4 if task.args.get("big_model") else 1
    return my_cloud(image=f"hud/{task.env}", gpus=gpus)

job = await taskset.run(agent, runtime=placer)
See placement for the built-in providers (LocalRuntime, Runtime(url), HUDRuntime).

Any OpenAI-compatible endpoint

OpenAIChatAgent speaks the OpenAI Chat Completions API, so vLLM servers, local models, and hosted checkpoints all work — point base_url at the server:
run.py
from hud.agents import OpenAIChatAgent
from hud.agents.types import OpenAIChatConfig

agent = OpenAIChatAgent(OpenAIChatConfig(
    model="my-model",
    base_url="http://localhost:8000/v1",
    api_key="local",
))

Serve an agent over A2A

The Chat runner is protocol-agnostic — an A2A endpoint is a thin adapter that translates requests into chat.send() calls:
from hud import Chat
from hud.agents import create_agent

chat = Chat(my_task(messages=[]), create_agent("claude-sonnet-4-5"))
reply = await chat.send("hello")   # any protocol frontend calls this
See cookbooks/a2a-chat/server.py for a complete A2A reference server (per-context sessions, agent card, citations transport) built on a2a-sdk.

See also

Agents

Capabilities

Chat

Patterns