- Automations — Trigger agent runs from CI/CD, webhooks, or other services
- Integrations — Embed HUD agents in your existing tools
- Demos — Share a simple endpoint that showcases your agent’s capabilities
Overview
The workflow is:- Create a Scenario — Define setup and evaluation in your environment
- Train (Optional) — Fine-tune a model on successful runs
- Call the API — Use the
/v1/agent/runendpoint to trigger runs
Step 1: Create a Scenario
Scenarios define what your agent does. In your environment code:- Go to hud.ai/environments → New Environment
- Connect your GitHub repository or upload your code
- The platform builds and deploys automatically
Step 2: Train a Model (Optional)
If you want better performance, train a model on successful trajectories:- Create a Taskset with tasks using your scenario
- Run evaluations to generate trajectories
- Go to the Models tab in your taskset and click Train Model
- Select successful runs and a base model for fine-tuning
Training is optional. You can use any available model directly without fine-tuning.
Step 3: Call the API
Once your scenario exists, call it via the REST API:cURL
Response
trace_id lets you look up the full run on hud.ai or via the API.
Python
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
env_name | string | ✓ | Environment name |
scenario_name | string | ✓ | Scenario to run |
scenario_args | object | ✓ | Arguments for the scenario |
model | string | ✓ | Model to use (see Models) |
max_steps | integer | Maximum agent actions (default: 100, max: 500) |
Viewing Results
Each run creates a trace. View it at:- Full agent trajectory (actions + observations)
- Tool calls and responses
- Final evaluation result and reward
- Timing and token usage
From the Platform
Every scenario card has a code snippet panel with ready-to-copy commands:- Go to your environment’s Scenarios tab
- Click the
</>icon on any scenario card - Select cURL or Python tab
- Copy the command with your scenario args pre-filled
Use Cases
Webhook Handler
Trigger agent runs from external events:Scheduled Tasks
Run agents on a schedule with cron or similar:Chat Interface
Power a chat UI with agent capabilities:Best Practices
- Set appropriate
max_steps— Lower for simple tasks, higher for complex ones - Handle errors — The API returns standard HTTP error codes
- Monitor usage — Each run consumes compute; check your usage dashboard
- Use trained models — Fine-tuned models often perform better on specific tasks
Slack Integration
Run agents from Slack
Models
Available models and fine-tuning