Skip to main content
Back

Together AI Opens Hurdle to Test if Coding Agents Can Use Your API

Together AI open-sources Hurdle, an npm framework that runs Claude Code and Codex against real tasks on your API to measure how well agents use your platform.

Repo, Full Access
  • Together AI open-sourced Hurdle, an npm library for running agent evals against your own API, docs, and MCP servers.
  • Runs Claude Code and Codex on real tasks and scores runs with code checks, guards, and an LLM judge.
  • Guards block disallowed actions like starting a paid GPU cluster, counting attempts as failures.
  • Supports conditions and repeats so you can measure skill or MCP impact across many runs.
  • Sandboxed runs use a Guardian proxy that swaps in real API keys so agents never see them.
  • Install with npx hurdle init; requires Node.js 22.18+ and Claude Code or Codex CLI.

Together AI has open-sourced Hurdle, an npm package it built to test whether coding agents can complete real tasks against an API. The tool currently runs Claude Code or Codex on developer-style prompts, records each session, and scores the outcome. Platform teams can use those results to measure how changes to an SDK, documentation, skill file, or Model Context Protocol server affect completion rates and failure modes.

Turn prompts into test cases

Each Hurdle evaluation begins with a task: a prompt resembling one a developer would give an agent working with the product. Tasks can test whether an agent finds the correct SDK methods, follows documentation, produces the required files, or uses a Model Context Protocol server, which exposes tools and context to compatible agents. Hurdle runs the task, records the full session, and applies pass criteria defined by the evaluator.

Catch failures three ways

An agent can produce a plausible answer after making a forbidden request, or fail after creating the correct artifact. Hurdle can combine three scoring mechanisms in one run so teams can evaluate outputs, API behavior, and safety separately:

  • Code checks: Assertions about the run, including required API requests, generated files, and returned data. API request checks require sandboxed execution.
  • Guards: Rules that intercept prohibited actions, such as creating an expensive GPU cluster. The blocked attempt causes the run to fail.
  • LLM judge: A model reviews the recorded session against a plain-English rubric and returns a pass or failure.

Guards encode destructive-action and cost controls directly in the evaluation. A rule can reject any request to create a paid GPU cluster, fail the run, and prevent the resource from starting.

Test conditions, then repeat

Conditions let one task run under different agent configurations. A suite might compare a baseline session with another that has an MCP server installed, then repeat the comparison with a custom skill file or revised system prompt. Fresh sessions keep state from leaking between runs.

Hurdle evaluates each task across every specified agent and model pairing, condition, and repeat. Repetition accounts for the fact that agents can take different paths on identical prompts. One task across two models and two conditions, repeated 15 times, produces 60 runs and makes run-to-run variance visible.

Hurdle leaderboard comparing pass rates across tasks and conditions
The Hurdle viewer compares pass rates across tasks, models, and conditions.

Isolation determines visibility

Mode Execution environment Request controls Credential exposure
Local Runs under the current user account No request inspection, guards, or API request checks The agent can access local files and available credentials
Sandboxed Runs in a fresh Together Sandbox Guardian can inspect, allow, reject, and record outbound requests Real API keys remain outside the sandbox

Local execution runs the agent with the current user’s permissions, which keeps startup fast while exposing the local filesystem and available credentials. Since Hurdle cannot mediate network traffic in this mode, API request checks and guards are unavailable.

Sandboxed execution starts a local proxy called Guardian and opens a single WebSocket connection to Together, which creates a fresh sandbox for the run. The sandbox has no direct network access, so every outbound request from the agent passes through Guardian for inspection.

Real API credentials remain on the local side of the connection. Guardian gives the agent random placeholder keys, replaces them with valid credentials when forwarding approved requests, and records the calls for evaluation. Agent transcripts therefore contain placeholders instead of usable secrets.

Run the first suite

Install the prerequisites

  • Runtime: Node.js 22.18 or later.
  • Agent CLI: Claude Code or Codex.
  • Model credentials: An ANTHROPIC_API_KEY or OPENAI_API_KEY.
  • Sandbox credentials: A TOGETHER_API_KEY.
  • Guardian support: macOS or Linux.

Scaffold the suite

mkdir my-evals && cd my-evals
npx hurdle init

The init command creates an evals/ directory containing a starter task and suite. Add the required model key to .env.local, along with a TOGETHER_API_KEY for sandboxed runs. Then execute the suite and open the results viewer:

npx hurdle run --view

Build a regression baseline

Agent evaluations are often assembled from shell scripts, manual transcripts, and screenshots. Hurdle packages task definitions, isolated runs, checks, guards, repetitions, and results into a reusable suite. Together’s Code Sandbox supplies the isolated runtime, while Hurdle handles orchestration and evaluation.

Together recommends beginning with a narrow suite that is easy to inspect and rerun after SDK or documentation changes. Its suggested sequence is:

  1. Choose one task that users already give their agents.
  2. Write the task as a prompt and add one deterministic check.
  3. Run it on the strongest target model and one lower tier.
  4. Repeat each configuration several times.
  5. Compare pass rates and inspect failed transcripts before expanding the suite.

Rerunning that baseline after an SDK release, documentation edit, skill update, or MCP server change shows whether agent completion rates and failure patterns have shifted.