Introduction

If you've been following along since the WordPress to Django migration post, you already know the drill around here: an AI does the heavy lifting, and I sit in the approval seat making the calls. Turns out there's a word for exactly that setup, and it's suddenly everywhere in AI circles — harness.

It's one of those terms that sounds vague until it clicks, and once it clicks, you start seeing it (and the lack of it) in every AI tool you touch. Let's get you fluent.


What Is a Harness?

In plain English: think of a powerful horse. On its own it has raw strength but no way to direct that strength anywhere useful. A harness — the straps, reins, and hardware — is what lets you point that power at a plow or a cart instead of a random field. The horse doesn't get weaker. It gets usable.

In IT terms: an AI harness is the software scaffolding wrapped around a raw LLM API call that turns it into something you can actually run in production. That includes:

  • Prompt and context templates (your claude.md / AGENTS.md files fall squarely here)
  • Tool-calling logic — letting the model touch files, run shell commands, hit APIs
  • Memory and state management across turns
  • Retry logic and error handling
  • Logging and audit trails
  • Human-approval gates before consequential actions actually execute

The model itself is the engine. The harness is everything that keeps that engine pointed at something useful instead of running wild.

Worth knowing: the term isn't brand new. It's borrowed from the older software-testing concept of a test harness — a set of scripts and fixtures that run a program under controlled conditions. The AI world just reused the idea: instead of harnessing a program under test, you're harnessing a model's raw completions.

Here's why the distinction actually matters for your setup: the model is swappable. Today it's Qwen 3.7 running under Opencode; tomorrow it could be a different model entirely. What stays constant — what's actually yours — is the harness: the context file, the tool permissions, the approval checkpoints. That's the part worth investing in.


10 Examples of AI Harnesses

# Harness What it does GitHub
1 Claude Code CLI harness wrapping an LLM with file-editing, bash execution, and git operations for coding tasks. anthropics/claude-code
2 Opencode (paired with a model like Qwen) Open-source coding-agent harness handling the prompt/tool-call/diff loop so any compatible model can drive a dev workflow. sst/opencode
3 LangChain / LangGraph General-purpose orchestration harness for chaining prompts, memory, and tool calls into multi-step pipelines. langchain-ai/langchain · langchain-ai/langgraph
4 AutoGen / AutoGPT Autonomous-agent harnesses that let a model loop toward a goal with minimal human input, spawning its own sub-tasks. microsoft/autogen · Significant-Gravitas/AutoGPT
5 Aider A git-aware CLI harness for pair-programming directly against your repo, tracking diffs and commits. Aider-AI/aider
6 Cursor / Windsurf IDE-embedded harnesses that feed the model editor context — open files, cursor position, project structure. Closed-source (no public repo) — see cursor.com / windsurf.com
7 Hexstrike AI A pentest-orchestration harness coordinating multiple AI-driven attack phases against a target, with human checkpoints between them. 0x4m4/hexstrike-ai
8 Microsoft Semantic Kernel Enterprise SDK-style harness for embedding LLM calls into business apps via "plugins" and "planners." microsoft/semantic-kernel
9 CrewAI A harness for multi-agent collaboration — defines roles, tasks, and hand-offs between several model instances working as a "crew." crewAIInc/crewAI
10 lm-evaluation-harness (EleutherAI) A benchmarking harness that runs a model through standardized tests to measure performance — the direct descendant of the original "test harness." EleutherAI/lm-evaluation-harness

Notice the pattern: #1–7 and #9 are all action-oriented harnesses — they get real work done. #10 is an evaluation harness — it measures rather than acts. Both count as harnesses; the common thread is structure wrapped around a raw model, not the specific job that structure does.


Best Practices

A few things I've learned building and running harnesses for infrastructure and pentest work:

  • Separate planning from execution. In my own setup, Gemini (with its longer context window) does the planning and generates the context file; Opencode + Qwen does the execution. Mixing the two roles into one model call tends to produce contradictions between what was planned and what actually runs.
  • Gate every consequential action. A harness that lets the model act freely without checkpoints isn't a harness — it's just an autonomous script with extra steps. The operator needs to understand each action well enough to approve it, not just rubber-stamp a prompt.
  • Log everything. If something goes sideways at 2am, you want an audit trail of exactly what the harness did and why, not a black box.
  • Keep harnesses narrow. A harness scoped tightly to one job (migrate a VPS, run a pentest phase) ages better than one trying to be a general-purpose do-everything agent. Composability beats scope creep.

Final Thoughts

So, to recap: a harness isn't the AI model — it's everything wrapped around it. Context and prompt templates, tool calling, memory and logging, and a human approval gate are what turn a raw LLM into something you can actually trust with real work. The model is the engine; the harness is the steering, the brakes, and the seatbelt. Once you start looking for this pattern, you'll notice it in pretty much every serious AI tool out there, and you'll have a much clearer way to evaluate whether a given tool is well-built or just a thin wrapper with no guardrails.

Now that "harness" is officially part of the vocabulary around here, expect it to show up again — especially once I get around to writing up the Android music player project, where the harness question becomes "do I even need one for a single-developer Kotlin build, or is a plain Claude Code session harness enough?" Stay tuned.

Further Reading

If you want to go deeper on this topic, these are worth a read: