8020briefSign in
Explainer

How an AI agent's harness works

An AI model answers questions. A harness turns answers into finished work.

Diagram of one example job run by an AI agent's harness: an invoice for $420 goes through five loops of five steps, and a check blocks the payment in loop 4. Below it, five free agent builders to try: n8n, Dify, Langflow, Sim and CrewAI.
One example job from start to finish. The invoice, the supplier and the amounts are illustrative. Tap the image to zoom.

On its own, a model does one thing: it takes a question and returns an answer. A harness is the system around the model that coordinates those exchanges into a chain. It asks the model what to do next, carries out that step, hands the result back as the next question and repeats until the job is done. Model plus harness is an AI agent.

A typical harness has five parts, each configured on its own:

  1. Instructions: your brief, plus memory of past jobs.
  2. Checks: rules in code that run before any action.
  3. Approvals: which actions wait for a person.
  4. Tools: what it can read and do in your systems.
  5. Stop or repeat: when to loop again and when to finish.

In our example, each part runs as a step in a chain that the harness coordinates through five loops to move the job forward.

The instructions: pay invoices under $500 that arrive in this inbox. One for $420 arrives. Loops 1 to 3 find the matching order, pull the supplier's record and draft the payment. In loop 4 the model asks to queue the payment. Two checks pass: under $500, not a duplicate. A third fails: the account details differ from the supplier's record.

The instructions set the workflow, and the checks set the conditions for allowing the payment. A rule in code stopped it during loop 4 and pushed the job back to the instructions step to start a fifth loop. There the model messaged the finance lead in Slack and memory saved a note for future reference: hold this supplier's payments.

Harness engineering is becoming a skill of its own. OpenAI and LangChain both published on it in February 2026. LangChain moved its coding agent from the top 30 to the top 5 on Terminal Bench 2.0, a public benchmark, by changing only the harness.

Several tools are free to start using. n8n, Dify, Langflow and Sim need little or no code. CrewAI is open source if you code.

Which other harness builders would you recommend? Tell us.

Sources

  1. OpenAI: Harness engineering, 11 Feb 2026
  2. LangChain: Improving Deep Agents with harness engineering, 17 Feb 2026
  3. LangChain: The anatomy of an agent harness, 10 Mar 2026
  4. Claude Agent SDK docs: How the agent loop works, read 25 Nov 2026
  5. OpenAI: Guardrails and human review, read 25 Nov 2026
  6. National Crime Agency: Invoice fraud campaign with NatWest, 29 Jan 2026
  7. n8n: Pricing, read 26 Nov 2026
  8. Dify: Pricing, read 26 Nov 2026
  9. Langflow: Repository and licence, read 26 Nov 2026
  10. Sim: Is Sim free to use?, read 26 Nov 2026
  11. CrewAI: Pricing, read 26 Nov 2026

The invoice, the supplier and the amounts are an illustrative example.

Scroll across the picture to read it.

Diagram of one example job run by an AI agent's harness: an invoice for $420 goes through five loops of five steps, and a check blocks the payment in loop 4. Below it, five free agent builders to try: n8n, Dify, Langflow, Sim and CrewAI.
Weekly email

Get 8020brief by email

One email a week with the insights that matter most. Five minutes to read.

We’ll email you a link to confirm. Unsubscribe anytime. Privacy

Read past editions →