What if the harness mattered more than the model? - Aditya Bhargava, Etsy

Aditya Bhargava argues that the 'harness' (the surrounding logic and tools) is more critical than the underlying LLM model itself for building effective AI agents. He proposes that focusing on sophisticated harness design, supported by his new language Agency, can enable local, open-source models to achieve performance comparable to large proprietary models, thereby reducing dependency and fostering innovation.

4 min read
What if the harness mattered more than the model? - Aditya Bhargava, Etsy
source: https://www.youtube.com/watch?v=2e9ANoOEn28

The Underestimated Power of the Harness

Aditya Bhargava challenges the prevailing industry wisdom that advanced, proprietary models negate the need for sophisticated harnesses. He argues that this approach fosters over-reliance on a few large companies and prevents the adoption of local, open-source models. Instead, Bhargava champions a paradigm where a well-crafted “harness” can elevate the performance of weaker, locally runnable models to match or even surpass cutting-edge proprietary ones.

He points to research, such as the Harness Bench, demonstrating that harness variations can lead to significant performance differences (over 20 percentage points) even with the same underlying model. Crucially, this research indicates that for weaker models, the harness’s impact is even more pronounced. This finding is a beacon of hope, as it decentralizes power: if a good harness can compensate for model limitations, then anyone can build and deploy powerful agents without dependence on expensive, proprietary solutions.

Agency: A Language-Level Solution for Agent Development

Bhargava’s research led him to conclude that existing tools and frameworks fall short in building truly effective harnesses, necessitating a “language-level solution.” This led to the creation of Agency, a new language (inspired by TypeScript and Python) designed specifically for building agents. He clarifies that while “agent” and “harness” are often used interchangeably, an agent truly comprises the model plus the harness. Agency, while new, aims to embody Alan Kay’s principle: “Simple things should be simple, complex things should be possible,” making core agent functionalities easy while enabling sophisticated capabilities.

Building a Better Harness: An Evolutionary Journey

Bhargava illustrates the iterative improvement of an agent’s harness through seven examples using a coding agent tasked with fixing a bug in a median function:

  1. Model Only: The baseline agent, with only a prompt, is incapable of interacting with its environment (e.g., cannot read files).
  2. Adding Tools: Introducing tools like read and write enables interaction, but exposes a critical safety issue: arbitrary file access is dangerous.
  3. Handlers for Safety: Agency’s interrupt and handler system allows for human-in-the-loop approval for sensitive actions, ensuring safety but introducing significant delays.
  4. Partial Function Application (PFA) for Safe Autonomy: By applying functional programming concepts, PFA allows constraining tool parameters (e.g., locking read/write operations to a specific directory). This achieves safety without human intervention, making the agent autonomous yet secure.
  5. Feedback Loop for Reasoning (React Pattern): Implementing a “reason and act” (React) pattern, where the agent repeatedly reasons, takes action, observes consequences (e.g., running tests, reading errors), and adjusts, drastically improves performance and confidence. The agent can now automatically fix code and verify its solution.
  6. Sub-agents for Expanded Capabilities: To enable agents to perform diverse tasks without overwhelming their context, Agency allows defining sub-agents as specialized tools. This pattern groups related tools, preventing context bloat and improving tool selection accuracy. For example, a main agent can delegate tasks to a “coding agent” or a “Wikipedia agent.”
  7. Self-Optimization for Measured Improvement: Agency integrates optimizers (like Japa) that allow developers to mark variables (e.g., prompts) for optimization. By defining a goal, the optimizer systematically experiments, measures performance, and refines the harness elements, moving beyond “trial and error” to data-driven enhancement.

Key Agency Language Features

Agency provides several features crucial for harness development:

  • Simple Tool Syntax: Any function can easily be exposed as a tool to the LLM.
  • Built-in Safety Mechanisms: Interrupts, handlers, and Partial Function Application (PFA) enable robust and customizable safety.
  • True Pause and Resume Execution: A standout feature, Agency can pause agent execution at any point (even deep within nested calls or loops), return control to the user, and then seamlessly resume execution later, allowing for complex human-in-the-loop workflows without code restructuring.
  • Integrated Optimizers: Tools for systematically improving agent performance through data-driven refinement.

Bhargava concludes by reiterating that a superior harness leads to better performance, particularly for less powerful models. He encourages the AI community to embrace this direction, fostering innovation in harness design to enable the widespread use of local, open-source models without sacrificing capability.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

Field Guide to Fable — Thariq Shihipar, Anthropic

Field Guide to Fable — Thariq Shihipar, Anthropic

Thariq Shihipar from Anthropic introduces Fable, their newest model, as a major leap forward, emphasizing "capability overhang" where tool use unlocks unprecedented intelligence. He provides a "field guide" on working with Fable, discussing evolving prompt engineering, advanced tool interactions (like HTML reports), and strategies for identifying project unknowns. He concludes by challenging the necessity of traditional tradeoffs, advocating for ambitious development that is both good, fast, and cheap, and urging AI engineers to prove the transformative power of AI.

What Is AI Code Refactoring? Agentic AI & Safe Code Changes

What Is AI Code Refactoring? Agentic AI & Safe Code Changes

This video explores AI code refactoring, differentiating between inline and autonomous agentic approaches. It highlights how AI can leverage pattern recognition for tasks like improving readability or reducing duplication, thereby addressing technical debt. A key focus is on the safety guardrails, detailing a multi-step, human-in-the-loop process involving planning, searching, reporting, human approval, patching, and verification through testing, ensuring AI-driven changes are safe for production and can integrate into CI/CD pipelines.