Freehand:给模型一个外壳、独立的记忆和一个计量器,其余的让它自行决定。
主流的代理框架在模型看到任务之前就会做出许多决策。冗长的系统提示词设定策略,数十个预设工具和固定的超时时间设定行为方式,而阈值压缩机制则决定其记忆内容。这些预设对较弱的模型帮助很大,但对于前沿模型而言,它们反而成了阻碍。
Freehand 保留的内容极少:
一个约 200 词的提示词,仅描述运行时环境,不包含任何工作流或行为规则;
一个 Bash 工具,由模型为每个命令设置超时时间;
一段可由模型自行编辑的对话历史,因此不存在固定的阈值压缩机制;
每轮交互后的计量器数据:上下文大小、Token 数量、成本和耗时。
结果。我们使用 GPT-6-astra、Claude Opus 5.5 和 Gemini 4 Carbon 在 5 个基准测试(Terminal-Bench 4、Terminal-Bench Science、Agents' Last Exam、OSWorld 2.1、AutomationBench)中进行了测试:
在所有 11 种设置下,Freehand 均取得了最高分数和最低成本。
与每个模型自带的框架(Codex、Claude Code、Gemini CLI)相比,其平均得分高出 5.1 分,而成本降低了 49%。
它的平均速度最快。在受控的并列重跑测试中,其他所有框架的耗时均延长了 17–62%。
它还击败了 OpenCode、Pi、DeepSeek Harness 以及仅使用 Bash 的 mini-swe-agent。
故事的另一方面同样重要:对于较低端的模型,官方框架再次胜出。随着模型能力的增强,最好的框架是那个做出最少决策的框架。
Freehand 已开源(MIT 协议),提供终端界面、Web 界面和桌面应用(测试版):
curl -LsSf https://raw.githubusercontent.com/microsoft/FreeHand/main/install.sh | sh
🌐 项目页面 + 视频:https://microsoft.github.io/FreeHand/
💻 代码:https://github.com/microsoft/FreeHand
这是 AgentOpt 系列的一部分(SkillOpt · EnvOpt · EvalOpt)。欢迎提供反馈!
Freehand: give the model a shell, its own memory, and a meter, and let it decide the rest.
Mainstream agent harnesses make many decisions before the model has seen the task. Long system prompts set the strategy, dozens of preset tools and fixed timeouts set how it acts, and threshold compaction sets what it remembers. These presets help weaker models a lot. For frontier models, they get in the way.
Freehand keeps very little:
a ~200-word prompt that only describes the runtime, with no workflows or behavioral rules
one bash tool, where the model sets each command's timeout
a conversation history the model can edit itself, so there is no fixed-threshold compaction
a meter after every turn: context size, tokens, cost, and elapsed time
Results. We tested 5 benchmarks (Terminal-Bench 4, Terminal-Bench Science, Agents' Last Exam, OSWorld 2.1, AutomationBench) with GPT-6-astra, Claude Opus 5.5, and Gemini 4 Carbon:
Freehand had the highest score and the lowest cost in all 11 of 11 settings.
Compared with each model's own harness (Codex, Claude Code, Gemini CLI), it scored 5.1 points higher on average at 49% lower cost.
It was fastest on average. In a controlled side-by-side rerun, each of the other harnesses took 17–62% longer.
It also beat OpenCode, Pi, DeepSeek Harness, and the bash-only mini-swe-agent.
The other half of the story matters too: with lower-tier models, the first-party harnesses win again. As models get stronger, the best harness is the one that decides the least.
Freehand is open source (MIT), with a terminal UI, a web UI, and a desktop app (beta):
curl -LsSf https://raw.githubusercontent.com/microsoft/FreeHand/main/install.sh | sh
🌐 Project page + video: https://microsoft.github.io/FreeHand/
💻 Code: https://github.com/microsoft/FreeHand
Part of the AgentOpt series ( SkillOpt · EnvOpt · EvalOpt ). Feedback welcome!
首次收录 · 2026-12-03 · 10.95 分