# How AI Harnesses Work

By Dustin Paris

Topic: Computing, AI &amp; Electronics

[Open the interactive Jig](https://ask.jig.com/j/scAnb5JBkxwH)

## Guide

### 1. A model on its own

This glowing orb stands for a large language model, or LLM: a program trained on huge amounts of text to predict which words come next\. Give it words and it writes words back\. On its own, it cannot open a file, search the web or press a button\.

A model reads and writes text in small pieces called tokens, shown here circling inside the glass\.

### 2. Wrap it in a harness

A harness is the software built around the model\. It gives the model a loop to work in, tools to use, a desk of notes and safety rules\. A model plus its harness makes an agent: an AI that can carry out a task step by step\.

People often sum it up as: agent = model \+ harness\.

### 3. The loop

Follow the bead around the gold track\. The harness gathers the goal and notes, asks the model what to do next, carries out that answer, then brings the result back\. It repeats this loop until the job is done\.

One well\-known recipe names the three moves of each lap: think, act, observe\.

### 4. Tools are its hands

The model can only write a request, such as “search for this”\. The harness checks it, runs the real tool, and turns the result back into words the model can read\. Watch each tool lift when the harness uses it\.

Tools can search the web, read and write files or run tests\. More is not always better: one team reported better results after removing 80% of its tools\.

### 5. The context desk

Before every lap, the harness lays out everything the model will read: instructions, the tool list, the conversation and each result\. That pile is called the context, and it has a size limit\. Press Tidy up to squeeze old pages into a short summary\.

Large models can read up to about a million tokens at once, yet a fuller desk can make them miss details\. Tidying up is called compaction\.

### 6. The safety gate

Some actions are risky, like deleting files or spending money\. A careful harness stops at the gate and asks a person first\. This request is waiting: press Approve to let it through\.

Harnesses also cap the number of steps, retry when something fails and keep a log of every action\.

### 7. The whole agent at work

Press Send a goal and watch every part work together\. The bead laps the track, tools lift, the desk fills and the gate checks each request\. When the model decides the job is finished, the answer comes back to the screen\.

Small slips add up: ten steps that each work 99% of the time all succeed only about 90% of the time\. Checks in the harness catch mistakes\.

### 8. Using a harness yourself

You may already use one: coding helpers and chat apps that search or run code are harnesses around a model\. Start simple, give a clear goal, let it check its own work and approve risky steps yourself\.

One team reported jumping from outside the top 30 to 5th place on a coding test by changing only its harness\.
