Firehorse發布,消除OpenReward環境中Agent harness整合障礙
Firehorse發布,消除OpenReward環境中Agent harness整合障礙。
Firehorse是Python函式庫,於2026年4月21日發布,橋接熱門Agent harness與OpenReward環境,讓使用者無需自訂工具集,即可任意模型搭配任意harness在任意環境中取樣軌跡。此早期實驗性函式庫支援Claude Code、ReSum、Codex及Gemini CLI等Agent類型,強調並行執行與即時串流至OpenReward平台。
支援的Agent類型
Firehorse整合多種Agent,適配OpenReward環境工具集:
claude-code:透過MCP工具伺服器,使用Claude Code CLI評估模型(測試版v2.1.88)。resum(預設):ReAct變體,具脈絡壓縮功能,總結先前步驟以支援更長情節。codex:整合OpenAI Codex Agent(測試版v0.121.0),適用程式碼導向環境。react:直接LLM API的Reason-Act迴圈。gemini:Google開源Gemini CLI(測試版v0.38.2),透過MCP工具支援環境評估。
這些Agent相容多供應商,包括OpenRouter、OpenAI、Anthropic、Google Gemini及自訂OpenAI相容端點。
模型供應商與思考控制
Firehorse支援廣泛模型提供者,並透過--effort旗標精準控制模型思考深度,映射至各供應商原生機制:
- Anthropic:Adaptive thinking(low/medium/high/max,max限Opus)。
- OpenAI:
reasoning_effort(low/medium/high/xhigh)。 - Google Gemini 3.x:
thinking_level(low/medium/high)。 - OpenRouter:透傳至底層供應商。
不支援思考的模型(如GPT-4.1)會忽略旗標。範例指令如firehorse --env GeneralReasoning/CTF --model anthropic/claude-sonnet-4-6 --effort high,啟用高強度思考;或--effort low加速執行。
主要使用情境
Firehorse聚焦評估與中間訓練資料生成兩大工作流程,透過單一指令實現大規模軌跡取樣。
評估工作流程
使用者可輕鬆評估任意模型於OpenReward環境,例如「Terminal-Bench-2-Verified」基準測試包含89項終端軟體工程任務,涵蓋編譯、加密、資料處理、機器學習、系統管理及科學運算。只需一指令:
firehorse --env GeneralReasoning/terminal-bench-2-verified --agent claude-code --model anthropic/claude-sonnet-4-6
Firehorse自動適配harness專屬工具集、並行執行試驗,並即時串流結果至OpenReward。輸出結構化JSONL軌跡,內含獎勵分數、token使用量及成本估計。
中間訓練資料生成
適用大規模軌跡取樣,例如「SWE-rebench-V2」(Nebius提供)包含逾32,000項真實軟體工程任務,涵蓋Python、JavaScript、Go、Rust等語言,為Agent程式碼軌跡之豐富來源。指令範例:
firehorse --env nebius/SWE-rebench-V2 --split train --agent react --model openrouter/z-ai/glm-5.1 --n-concurrent 8 --output-dir ./trajectories
每條軌跡記錄完整Agent互動,包括工具呼叫、觀察及獎勵,以結構化JSONL格式輸出,直接匯入訓練管線。高並行度支援數千任務,建構大型微調資料集。
快速入門與先決條件
安裝僅需pip install firehorse-cli,Python 3.10+環境,並設定環境變數:
OPENREWARD_API_KEY(自openreward.ai/keys取得)。- LLM供應商金鑰,如
OPENROUTER_API_KEY。
特定Agent需預裝CLI:Claude Code v2.1.88、Codex v0.121.0、Gemini v0.38.2。範例執行:
firehorse --env Eigent/SETA --agent claude-code --model openrouter/moonshotai/kimi-k2.6 --split train --output-dir ./kimi-seta
CLI參數參考
核心指令:firehorse --env ENV --model MODEL [OPTIONS]。關鍵選項包括:
--agent:指定類型(預設resum)。--split:任務分割(預設test)。--n-concurrent:最大並行試驗數(預設1)。--max-tasks/--max-turns:限制任務數或工具呼叫回合。--effort:思考強度(none/low/medium/high/max/xhigh,預設none)。--output-dir:軌跡日誌目錄。--disable-builtin-tools:停用特定工具。
其他如--run-name、--secret、--use-all-filesystem-tools(codex專用)提供細緻控制。
輸出格式與細節
指定--output-dir時,產生完整檔案結構:
output_dir/
├── run_result.json # 所有試驗彙總結果
├── trial_0.jsonl # 完整Agent軌跡
├── trial_0_result.json # 單試驗摘要(獎勵、token、成本、持續時間)
├── trial_0_rewards.jsonl # 每工具呼叫獎勵訊號
└── ...
單試驗結果欄位涵蓋reward(最終獎勵)、finished(任務完成)、turns_used(工具回合數)、input_tokens / output_tokens(總token)、cost_usd(API成本估計)、duration_seconds(實際時間)。
JSONL軌跡統一bookend事件(如openreward_prompt、openreward_summary),中間依Agent類型變動:API Agent(react/resum)產生標準化事件(assistant、tool_call、tool_result);CLI Agent(claude-code/codex/gemini)透傳原始串流格式。獎勵訊號另存trial_*_rewards.jsonl及OpenReward rollout。
實驗性質與未來
Firehorse為早期實驗函式庫,測試OpenReward新可組合工具集功能,預告更多支援即將推出。採用Apache 2.0授權,歡迎貢獻Pull Request。完整文件見docs.openreward.ai,GitHub:https://github.com/GeneralReasoning/firehorse,發布頁:https://gr.inc/releases/introducing-firehorse。透過消除harness與環境配接摩擦,Firehorse加速模型評估與開源Agent資料收集,強化中間訓練生態。
🔥🐴 Firehorse.
— General Reasoning (@GenReasoning) April 21, 2026
Run any model with any harness on any @OpenReward environment.
⚖️ Evaluate the latest models on environment endpoints.
🗂️ Collect agentic data for midtraining and SFT from open models.
🧪 Early experimental library. More support soon.
Link below. pic.twitter.com/UB62eUoGUX
Release: https://t.co/vJOjdMbyk5
— General Reasoning (@GenReasoning) April 21, 2026
GitHub: https://t.co/1tQWwnpFmn
