The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(bench): add common adapter utilities and update all harnesses
Steven Enamakel6cd5611e0e4a
diff --git a/bench/harnesses/bundles/adapters/_common.sh b/bench/harnesses/bundles/adapters/_common.shnew file mode 100755index 0000000000..e3a8847c84--- /dev/null+++ b/bench/harnesses/bundles/adapters/_common.sh@@ -0,0 +1,11 @@+# Sourced by every adapter. The task container provides:+# PROXY_URL (metering proxy) DUMMY_API_KEY BENCH_MODEL BENCH_REASONING+# PROMPT_FILE (task prompt) cwd = the task's working directory+# Harnesses never see the real OpenRouter key; the proxy swaps credentials and+# pins model + reasoning on every request regardless of what the harness asks for.+set -euo pipefail+export PATH=/opt/harness/node/bin:$PATH+export HOME=/tmp/bench-home+mkdir -p "$HOME"+PROMPT="$(cat "$PROMPT_FILE")"+WORKDIR_ABS="$(pwd)"diff --git a/bench/harnesses/bundles/adapters/claude-code.sh b/bench/harnesses/bundles/adapters/claude-code.shnew file mode 100755index 0000000000..38ddf56bf9--- /dev/null+++ b/bench/harnesses/bundles/adapters/claude-code.sh@@ -0,0 +1,15 @@+#!/usr/bin/env bash+. "$(dirname "$0")/_common.sh"+export PATH=/opt/harness/claude-code/bin:$PATH+export ANTHROPIC_BASE_URL="$PROXY_URL" # the SDK appends /v1/messages+export ANTHROPIC_AUTH_TOKEN="$DUMMY_API_KEY"+export ANTHROPIC_API_KEY=""+export ANTHROPIC_MODEL="$BENCH_MODEL"+export ANTHROPIC_SMALL_FAST_MODEL="$BENCH_MODEL"+export ANTHROPIC_DEFAULT_OPUS_MODEL="$BENCH_MODEL"+export ANTHROPIC_DEFAULT_SONNET_MODEL="$BENCH_MODEL"+export ANTHROPIC_DEFAULT_HAIKU_MODEL="$BENCH_MODEL"+export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1+export DISABLE_AUTOUPDATER=1+export IS_SANDBOX=1 # permission bypass is refused as root unless the container says it is a sandbox+exec claude -p "$PROMPT" --dangerously-skip-permissions --output-format jsondiff --git a/bench/harnesses/bundles/adapters/codex.sh b/bench/harnesses/bundles/adapters/codex.shnew file mode 100755index 0000000000..d4a2fbb83c--- /dev/null+++ b/bench/harnesses/bundles/adapters/codex.sh@@ -0,0 +1,20 @@+#!/usr/bin/env bash+. "$(dirname "$0")/_common.sh"+export PATH=/opt/harness/codex/bin:$PATH+export CODEX_HOME="$HOME/.codex"+mkdir -p "$CODEX_HOME"+# Codex only speaks the Responses wire now (wire_api = "chat" was removed), so+# this needs OpenRouter's /v1/responses to serve the pinned model.+cat > "$CODEX_HOME/config.toml" <<TOML+model = "$BENCH_MODEL"+model_provider = "proxy"+model_reasoning_effort = "$BENCH_REASONING"++[model_providers.proxy]+name = "proxy"+base_url = "$PROXY_URL/v1"+env_key = "DUMMY_API_KEY"+wire_api = "responses"+TOML+exec codex exec -C "$WORKDIR_ABS" --dangerously-bypass-approvals-and-sandbox \+ --skip-git-repo-check --ephemeral "$PROMPT"diff --git a/bench/harnesses/bundles/adapters/hermes.sh b/bench/harnesses/bundles/adapters/hermes.shnew file mode 100755index 0000000000..a8a7fa4151--- /dev/null+++ b/bench/harnesses/bundles/adapters/hermes.sh@@ -0,0 +1,19 @@+#!/usr/bin/env bash+. "$(dirname "$0")/_common.sh"+# The installer put Python, Node and hermes under /opt/harness/home (read-only+# mount); give it a writable copy. This copy is part of hermes's measured cold start.+cp -a /opt/harness/home/. "$HOME/"+export PATH="$HOME/.local/bin:$PATH"+export HERMES_HOME="$HOME/.hermes"+mkdir -p "$HERMES_HOME"+cat > "$HERMES_HOME/config.yaml" <<YAML+model:+ provider: "custom"+ default: "$BENCH_MODEL"+ base_url: "$PROXY_URL/v1"+ api_key: "$DUMMY_API_KEY"+agent:+ reasoning_effort: "$BENCH_REASONING"+YAML+export HERMES_YOLO_MODE=1+exec hermes --in "$WORKDIR_ABS" -z "$PROMPT" --yolo -m "$BENCH_MODEL" --provider customdiff --git a/bench/harnesses/bundles/adapters/openclaw.sh b/bench/harnesses/bundles/adapters/openclaw.shnew file mode 100755index 0000000000..04975da80c--- /dev/null+++ b/bench/harnesses/bundles/adapters/openclaw.sh@@ -0,0 +1,22 @@+#!/usr/bin/env bash+. "$(dirname "$0")/_common.sh"+export PATH=/opt/harness/openclaw/bin:$PATH+cat > "$HOME/openclaw.json5" <<JSON+{+ agents: { defaults: { model: { primary: "proxy/$BENCH_MODEL" } } },+ update: { checkOnStart: false },+ models: {+ mode: "merge",+ providers: {+ proxy: {+ baseUrl: "$PROXY_URL/v1",+ apiKey: "$DUMMY_API_KEY",+ api: "openai-completions",+ models: [{ id: "$BENCH_MODEL", name: "bench" }]+ }+ }+ }+}+JSON+exec openclaw agent exec --cwd "$WORKDIR_ABS" --config "$HOME/openclaw.json5" \+ --thinking "$BENCH_REASONING" --timeout "${TASK_TIMEOUT_S:-1800}" --json "$PROMPT"diff --git a/bench/harnesses/bundles/adapters/opencode.sh b/bench/harnesses/bundles/adapters/opencode.shnew file mode 100755index 0000000000..68cc186bef--- /dev/null+++ b/bench/harnesses/bundles/adapters/opencode.sh@@ -0,0 +1,21 @@+#!/usr/bin/env bash+. "$(dirname "$0")/_common.sh"+export PATH=/opt/harness/opencode/bin:$PATH+export OPENCODE_DISABLE_AUTOUPDATE=1+export OPENCODE_DISABLE_MODELS_FETCH=1+cat > "$HOME/opencode.json" <<JSON+{+ "\$schema": "https://opencode.ai/config.json",+ "provider": {+ "proxy": {+ "npm": "@ai-sdk/openai-compatible",+ "name": "proxy",+ "options": { "baseURL": "$PROXY_URL/v1", "apiKey": "$DUMMY_API_KEY" },+ "models": { "$BENCH_MODEL": { "name": "bench" } }+ }+ }+}+JSON+export OPENCODE_CONFIG="$HOME/opencode.json"+exec opencode run --dir "$WORKDIR_ABS" -m "proxy/$BENCH_MODEL" \+ --dangerously-skip-permissions "$PROMPT"