# AI agent harnesses

## Summary

IBM developer advocate Tejas explains what an AI agent harness actually is: the code around a model that keeps it reliable when you're renting black box inference. He builds a minimal harness live around a 2023-era model, fixing lying and login failures without touching the prompt once. His bet is that a great harness lets a cheap model punch way above its price.


## Core ideas

- Harness means reliability: you rent models as black boxes with limited context windows and zero guarantees, so the harness exists to make agents do their job no matter what the model does.

- Two different meanings: in machine learning a harness is a glorified test suite for models. In AI engineering it's everything around the model that grounds it in reality, like a climber's harness anchored to rock.

- Standard moving parts: tool registry, a model, context management primitives, guardrails like max steps, an agent loop, and a verify step. The harness sits around the agent loop and can even be a loop around that loop.

- The demo setup: a Playwright browser agent on GPT-3.5 Turbo gets one job, upvote the first Hacker News post. First run hits a login wall, panics, crashes, then lies about succeeding.

- Verify step kills the lie: a deterministic function reads the tool trace, checks for a real upvote click and failed logins, and forces the run to admit failure honestly.

- Harness handles login, never the agent: a login handler checks the URL each loop and injects credentials programmatically from harness code, which can hold secrets the model never sees.

- Guardrails are plain code: max six iterations, a message cap that triggers naive compression keeping only the system prompt, user prompt, and last two messages, plus max three attempts.

- Cheap model, strong harness: the prompt never changed once, yet the outcome flipped from lying failure to verified success. Pair free models like Qwen or GPT OSS with a good harness and you go far.

- Where this heads next: 2025 was the year of agents, 2026 is the year of harnesses, and Tejas bets 2027 brings dynamic on-the-fly harnesses an agent generates for itself before doing a task.


## Quotes

> The agent harness is everything around the model that gives it grounding in reality.

Tejas

> We don't write code anymore. We inspect diffs.

Tejas

> I did not touch the prompt once. I did not change your system prompt. We just built a harness, and the outcome radically changed.

Tejas

> step one to solving a problem is admitting you have one

Tejas

> twenty twenty-five was the year of agents... twenty twenty-six is the year of harnesses, I'm pretty sure

Tejas

> Models are non-deterministic, and you wanna do more with less.

Tejas


Source: https://lnkd.in/p/dRQJgKp9

Canonical: https://drop.rizzgroup.org/ledger/ai-agent-harnesses-g0uu2l
