Skip to content

Latest commit

 

History

History
162 lines (120 loc) · 11.4 KB

agents.md

File metadata and controls

162 lines (120 loc) · 11.4 KB

Agents and models

An agent is the program that does the task: Claude Code, Codex, OpenCode and dozens more. You choose it with -a, its model with -m, and how hard the model thinks with -e. Each agent needs a login or an API key for its model provider.

Pick an agent

These are the agents people run most, by downloads and by trials on BenchFlow:

Agent -a Logs in with
Claude Code claude an Anthropic API key, or a Claude subscription
Codex codex an OpenAI API key, or a ChatGPT login
OpenCode opencode the key of the model's provider
Pi pi the key of the model's provider
Antigravity agy a Gemini API key

Two more need no model: oracle runs the task's reference solution and nop does nothing. bench agents lists every agent, including GitHub Copilot CLI and others that come from the agents repository, and bench agents <name> shows one:

bench agents claude
claude-agent-acp
  Aliases:     claude
  Description: Claude Code via ACP (Anthropic's Agent Client Protocol)
  Protocol:    acp
  Launch:      /opt/benchflow/bin/claude-agent-acp
  Requires:    ANTHROPIC_API_KEY (or login)
  Provider auth: Provider-prefixed models may use different credentials; Azure Foundry models use AZURE_API_KEY + 
AZURE_API_ENDPOINT.
  Auth:        subscription via ~/.claude/.credentials.json

BenchFlow installs the agent inside the sandbox; you don't need it on your machine. It talks to most agents over the Agent Client Protocol (ACP), which is why many names end in -acp.

Log in or set a key

Agent API key Subscription
Claude Code export ANTHROPIC_API_KEY=... run claude setup-token and export CLAUDE_CODE_OAUTH_TOKEN=..., or log in with claude on this machine
Codex export OPENAI_API_KEY=... codex login on this machine
OpenCode, Pi, OpenHands the provider's key, such as DEEPSEEK_API_KEY none
Gemini CLI, Antigravity export GEMINI_API_KEY=... none: Google stopped serving Gemini CLI to subscription sign-ins on 2026-06-18

The subscription commands are the agents' own: claude setup-token and claude need Claude Code installed on your machine, and codex login needs the Codex CLI. An API key needs neither. bench doctor reports which logins it found (Install shows its output). A subscription login only works with models its plan includes.

Choose the model and effort

bench run <task> -a claude -m sonnet

-m takes the model in the agent's own naming. In 0.9.2, Claude Code on a subscription login offers default, sonnet, opus, haiku and claude-fable-5-1; any other name stops the trial before a model call, with agent integration failure [agent_model] and the names it offers (Quick start). -e (or --effort) sets reasoning effort for agents that have one: low, medium, high, max and so on, as the agent names them. How it reaches the agent in 0.9.2, from its agent list:

Agent -e goes to
Claude Code (claude) the agent's effort option
Codex (codex) the model id: Codex takes the model and effort together, as model[effort]
OpenCode (opencode) the agent's effort option, which OpenCode adds once a reasoning model is chosen
Antigravity (agy) the agent's thinking option
the others an effort option if the agent offers one when the trial starts

An agent with no such option stops the trial instead: reasoning_effort='max' was requested for agent '...', but that agent does not declare or advertise an ACP effort config option. The values each option takes are the agent's own.

The effort can also ride the model, -m 'gpt-6-astra[ultra]', or the agent's own settings (model_reasoning_effort in Codex's CODEX_CONFIG); each is the request, recorded as effort.requested. Two that differ are refused before launch, and so is a level the model cannot take: for Codex, the pinned Codex's catalog decides (gpt-6-astra and gpt-6.1-sol take low, medium, high, xhigh, max and ultra). After the run, effort.matches says whether the session and its calls ran at that level (The effort that ran).

Pass -m. Without it, an agent falls back to a default model, which for Claude Code in 0.9.2 is claude-haiku-4-5-20251001, an older one (0.10.0rc2's is claude-haiku-5-5).

The model and effort you pass are recorded in the trial's config.json (model, reasoning_effort). What the provider actually received is in trajectory/llm_trajectory.jsonl, one line per model call. Check it when a score depends on the setting: a provider can ignore one it doesn't support.

A model from another provider

Name the provider as a prefix, and export its key. OpenCode on DeepSeek:

export DEEPSEEK_API_KEY=...
bench run skillsbench/tasks/econ-detrending-correlation -a opencode -m deepseek/deepseek-v4-flash

skillsbench/ is a clone of SkillsBench at commit f860ecf0 (how).

[econ-detrending-correlation]   → end_turn, 14 total tool calls
[econ-detrending-correlation] Running verifier...
[econ-detrending-correlation] Rewards: {'reward': 1.0}
[PASS] econ-detrending-correlation (reward=1.00, tools=14)
Job complete: 1/1 (100.0%), mean_reward=1.00, errors=0, idle_timeouts=0, time=2.2min

✓ Score: 1/1 (100.0%), mean reward 1.00, errors=0
Outcomes: 1 scored (1 passed, 0 failed), 0 unscored, 0 errored
Cost:      $0.01, 247,840 tokens
Time:      2m 14s

Claude Code runs a model of every prefix below: BenchFlow's gateway takes its calls and makes them in the provider's own API. The Quick start runs it on Xiaomi's MiMo with -m xiaomi/mimo-v2.6-flash, and -m deepseek/deepseek-flash runs it on DeepSeek's own API. Codex needs a provider that serves OpenAI's Responses API, so it can't use MiMo. DeepSeek's API serves it, and DeepSeek publishes a model catalog for Codex: BenchFlow ships it and gives it to Codex for deepseek/deepseek-flash and deepseek/deepseek-v4-pro, so -a codex -m deepseek/deepseek-flash needs no Codex configuration of your own.

The provider prefixes

These are the prefixes BenchFlow knows, from its own provider list. A name with no prefix, such as sonnet, goes to the agent's own service; one that starts with a family in the last column, such as deepseek-v4-flash, goes to that provider without one. Codex is refused before the run starts, and by its dry run, when the provider doesn't serve the Responses API. Claude Code runs any provider's model: BenchFlow's gateway turns its calls into the provider's own API. The other agents name no API, and BenchFlow doesn't check them. bench run tasks/half-life -a codex -m xiaomi/mimo-v2.6-flash:

Agent 'codex-acp' requires provider protocol 'openai-responses', but provider 'xiaomi' for model 'xiaomi/mimo-v2.6-flash' only supports anthropic-messages, openai-completions. Use a provider prefix that matches the agent protocol.
No job was created.
Prefix Serves Key Also set Codex Family without a prefix
openai/, us-openai/ Chat Completions, Responses OPENAI_API_KEY yes
azure-foundry-openai/ Chat Completions, Responses AZURE_API_KEY AZURE_RESOURCE, or AZURE_API_ENDPOINT with the whole address yes
azure-foundry-anthropic/ Anthropic Messages AZURE_API_KEY AZURE_RESOURCE, or AZURE_API_ENDPOINT with the whole address no
anthropic-vertex/ Anthropic Messages a Google Cloud login GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION no
google-vertex/ Chat Completions a Google Cloud login GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION no
aws-bedrock/ Anthropic Messages, Responses AWS credentials yes
zai/, zai-coding/ Anthropic Messages, Chat Completions ZAI_API_KEY no
xiaomi/ Anthropic Messages, Chat Completions XIAOMI_API_KEY XIAOMI_BASE_URL no xiaomi, mimo
deepseek/ Chat Completions, Responses DEEPSEEK_API_KEY DEEPSEEK_BASE_URL, if not DeepSeek's own yes deepseek
kimi/ Chat Completions KIMI_API_KEY KIMI_BASE_URL no kimi, moonshot
minimax/ Chat Completions MINIMAX_API_KEY MINIMAX_BASE_URL no minimax
qwen-dashscope/ Chat Completions QWEN_API_KEY QWEN_BASE_URL no qwen
glm/ Chat Completions GLM_API_KEY GLM_BASE_URL no glm
hunyuan/ Chat Completions HUNYUAN_API_KEY HUNYUAN_BASE_URL no hunyuan
doubao-seed-2-lite/, doubao-seed-2-pro/ Chat Completions DOUBAO_SEED_2_LITE_API_KEY, DOUBAO_SEED_2_PRO_API_KEY DOUBAO_VOLCES_BASE_URL no the prefix's own name
openrouter/ Chat Completions OPENROUTER_API_KEY no
github-models/ Chat Completions GITHUB_TOKEN no
litellm/ Chat Completions LITELLM_API_KEY LITELLM_BASE_URL no
vllm/, sglang/ your server's OPENAI_API_KEY the server's address (below) yes

A model you serve

For a model behind your own OpenAI-compatible server (vLLM, SGLang), use the vllm/ or sglang/ prefix and pass the server's address to the agent:

export OPENAI_API_KEY=...        # whatever your server expects
bench run <task> -a opencode -m vllm/<served-model-name> \
  --agent-env BENCHFLOW_PROVIDER_BASE_URL=http://<host>:8000/v1

To show the flags with a real run, we pointed this at DeepSeek's OpenAI-compatible API in place of a server of our own:

OPENAI_API_KEY=$DEEPSEEK_API_KEY bench run skillsbench/tasks/econ-detrending-correlation \
  -a opencode -m vllm/deepseek-v4-flash --agent-env BENCHFLOW_PROVIDER_BASE_URL=https://api.deepseek.com/v1
[PASS] econ-detrending-correlation (reward=1.00, tools=8)
✓ Score: 1/1 (100.0%), mean reward 1.00, errors=0
Cost:      $0.01, 121,186 tokens

Pin the agent's version

Each BenchFlow release installs a fixed version of each agent, so two runs on the same release run the same agent. 0.9.2 installs Claude Code 2.1.280 (through claude-agent-acp 0.81.2) and Codex through codex-acp 2.0.1, and 0.10.0rc2 installs Claude Code 2.1.316; bench doctor prints the versions under "Agent versions". To change an agent's version, change BenchFlow's version. On 0.9.2, a trial's result.json doesn't record the agent's version (0.10.0rc2's records it as harness_versions); its agent/install-stdout.txt does, in the install command it ran (claude-agent-acp@0.81.2, claude-code@2.1.280). Write the version down with your results (Before you run an eval).

Run Claude Code or Codex through their own CLI

--harness native runs Claude Code or Codex through its own command-line program in headless JSON mode, instead of through its ACP adapter. Use it to compare against a published number that used the plain CLI. The default, --harness acp, is what the rest of these docs use.

Codex Apps

Codex can connect account tools such as Drive or Gmail ("Codex Apps"). Scored Codex runs turn them off, so an agent can't reach your accounts or data outside the task. Each trial records the policy it ran with.