Skip to content
All writing
December 4, 20266 min read

The Agentic Harness: Where AI Agents Actually Live — and Break

Everyone talks about the model. But almost everything interesting about an AI agent — and almost everything that goes wrong — lives in the harness around it. Here's why that's where security has to point.

  • AI Agents
  • AI Security
  • LLMs
  • Architecture

If you've worked with "AI agents," you've worked with a harness — even if nobody called it that.

The large language model is the engine. The agentic harness is everything built around it to turn a text predictor into something that takes actions: the loop that lets it call tools and read the results, the code that assembles its context and memory, the planner that decides what to do next, the permissions that gate what it can touch, and the guardrails that sit between it and the real world.

Here's what most people miss: almost everything interesting about an agent — and almost everything that goes wrong — lives in the harness, not the model.

The model is a small part of the system

A frontier model, on its own, does one thing: given text, predict more text. No memory between calls, no ability to run code, no access to your systems. Every "agent" capability — browsing, running tools, editing files, calling APIs, remembering what happened three steps ago — is harness code wrapping that stateless engine.

So when an agent books the wrong meeting, leaks a secret, loops forever, or gets hijacked, the root cause usually isn't "the model is dumb." It's the harness: how it fed the model context, which tools it exposed, what it did with the model's output, and what it failed to check.

The harness is the attack surface

This matters most for security, which is where I spend my time. When you threat-model an agent, you're really threat-modeling the harness:

  • Prompt injection rides in through tool outputs. The model reads a web page, an email, a document — and that untrusted content carries instructions. Whether those instructions become actions depends entirely on how the harness handles tool results and what it lets the model do next.
  • Tool permissions are the blast radius. An agent with a shell tool and broad credentials is a completely different risk than one with a scoped, read-only tool. The model doesn't enforce that — the harness does.
  • Context is poisonable. Memory, retrieved documents, and conversation history all flow back into the prompt. Anything that can write to them can steer future turns.
  • Loops and cost. Unbounded planning loops, runaway tool calls, and token blowups are harness failures, not model failures.

You can't secure an agent by securing the model. You secure it by securing the harness.

What a good harness does

The best harnesses I've worked with treat the model as a powerful but untrusted component and build controls around it:

  • Policy on every tool call — allow/deny decisions made outside the model, so a hijacked prompt can't grant itself new powers.
  • Scoped, least-privilege tools instead of one god-mode shell.
  • Validation of tool inputs and outputs, so injected content is caught before it becomes an action.
  • Hooks and observability — the ability to inspect, log, and intervene at each step (exactly what tool-use hooks and MCP-style boundaries give you).
  • Hard limits on loops, spend, and scope.

The takeaway

"Agent security" sounds like it should be about the model. It isn't. The model is the part you don't control and can't fully trust. The harness is the part you build — and it's where the capabilities, the failures, and the defenses all live. If you're putting agents into production, that's where to point your attention, and your controls.

Davis Barillas is a forward deployed engineer working across security, identity, and AI. I build small, sharp, privacy-first tools around the problems I run into in the field.