Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Artificial Intelligence
3 min read

Microsoft's Freehand: Minimal Agent Harness Tops Hugging Face, Cuts Cost 49%

Microsoft Research Asia's open-source Freehand project introduces a minimalist agent harness that delegates planning, tool use, and memory management to the model, achieving 5.1% higher accuracy and 49% lower cost than vendor harnesses across five benchmarks.

Microsoft Research Asia, together with Xi'an Jiaotong University, Zhejiang University, and Fudan University, has open-sourced Freehand , a minimalist agent harness that shifts decision-making authority from the harness to the language model. The project's technical report, titled "Freehand: The Bitter Lesson Comes to Agent Harnesses," reached the top of the Hugging Face daily paper ranking.

Problem: Harnesses as Cages

Current agent harnesses intervene in three dimensions:

A1 Task Policy: System prompts prescribe workflows and send continuous reminders before the model starts.

A2 Execution Mode: Tool sets, command timeouts, and operation rules are fixed; the model cannot freely try better approaches.

A3 Memory Management: Automatic context compression triggers at preset lengths; the model does not decide what to keep or discard.

These well-intentioned "crutches" can become "cages" — e.g., a harness interrupting a 20-minute computation after 30 seconds, or deleting a crucial clue during auto-compression.

Freehand's Core Design: Three Primitives

Freehand retains the classic Observe-Reason-Act loop but reallocates decision rights via three primitives:

Shell — provides execution capability via a single bash(command, timeout_s?) interface.

Editable Context — the conversation history is stored as transcript.json in the provider's native message format; the model reads and writes it directly via Bash.

Resource Status — after each turn, the harness appends a one-line status: turn number, context tokens, cumulative input/output tokens, execution cost, and elapsed time.

1. Minimal System Prompt (~200 words)

The prompt only describes the runtime environment, tool interface, context file location, and how to end the task. No predefined workflows or step-by-step instructions are given, allowing the model to adapt its strategy based on observed information.

2. Single Bash Interface for Tool Use

Instead of a curated toolbox, Freehand exposes only bash(command, timeout_s?). The model can invoke system commands, libraries, write Python scripts, build parsers, or create ad-hoc tools. Timeout is model-controlled (1–86,400 seconds, default 120s), so long-running scientific computations no longer need background polling.

3. Context as a File: Model-Managed Memory

The transcript is saved as transcript.json. The model can delete redundant entries, compress completed subtasks, or retain key results — deciding when to reorganize memory and what to keep. This also enables image handling: the model converts screenshots to Base64, inserts them into the transcript, and later removes them when no longer needed.

4. Real-Time Resource Feedback

Each turn ends with a status line (turn, context tokens, cumulative tokens, cost, time). The model uses this feedback to decide whether to compress context or adjust execution strategy.

Experimental Evaluation

Across 5 benchmarks and 3 frontier model families (11 experiment groups), Freehand outperformed vendor harnesses:

Accuracy: 63.2% average vs. 58.4% (Codex, Claude Code, etc.), 59.3% (Pi), 57.4% (DeepSeek Harness), 56.8% (OpenCode).

Cost: $3.23 per task average, a 52% reduction vs. $6.70 for vendor harnesses.

Speed: 31.7 minutes average, the fastest among all compared harnesses.

Detailed per-model, per-benchmark scores, costs, and latencies are provided in the paper's tables. Tests used GPT-6-astra and Claude Opus 5.5.

Repository: https://github.com/microsoft/FreeHand (desktop version available). Corresponding author Yang Yifan (Senior Researcher, MSRA) focuses on agent systems, AI self-evolution, and post-training.

For attribution, corrections or content rights, contactadmin@besthub.dev

Report an issue with this article

Discussion 0

Write a comment

Sign in to join the discussion

No public comments on this page. Sign in to comment