AI agent = LLM + harnessLLM vs harness vs agent and what the harness includes
An AI agent is an LLM plus a harness: the LLM only reasons and writes text, and the harness is everything around it that lets it act — a loop of steps, tools, context, rules and checks. Together they carry a task to a result, while an LLM alone only answers. Below: LLM vs harness vs agent in one table, the five groups a harness includes, and the same model in two harnesses.
An LLM only continues text. The harness is everything around it: the step loop, tools, access to files and services, rules and checks. Together they make an AI agent.
Takeaway
In this exampleThe same Claude model answers in chat and edits code in Claude Code. The difference is the harness.
In generalChat apps, assistants and agents can run on the same models. What sets them apart is what surrounds the model.
Next stepWhen you compare AI products, compare harnesses: what the product can do on its own and where.
Five concepts in one table
The columns compare best on the row "Who drives the task". The definitions of assistant and agent follow IBM: assistants are reactive and perform tasks at your request, while agents are primarily proactive and plan and act on their own toward a goal.
Chatbot and assistant. A chatbot answers for one company by a script: buttons, keywords, handoff to an operator. Some bots run on an LLM, but the limits stay the same. An assistant understands any request and carries it out in your apps: an email, a reminder, a search. Each next step is a new command from you.
Agents today are industrial: for code, data, support. Mass-market cloud agents "for everyone" do not exist yet. Observation from the author's projects.
Takeaway
In this exampleA bank bot answers about fees. Alice sets a reminder on command. An agent gets the goal "prepare the release" and decides what to read, what to run and when to stop.
In generalA chatbot follows the company's script, an assistant follows your commands, an agent drives itself. The model inside can be the same.
Next stepAsk about a product: who picks the next step? A script means a bot, you mean an assistant or chat, the product itself means an agent.
LLM vs harness vs agent
What each of the three has. The agent column is the sum of the first two.
In this exampleClaude Code: the loop in the CLI, tools via MCP, rules in CLAUDE.md, control through permissions and hooks, verification through your tests.
In generalMost agent failures seen in practice trace back to one of the five groups: a missing tool, missing context or a missing check.
Next stepWhen the agent fails, ask which group was missing, and fix it there instead of rewriting the prompt.
A study at ICML 2026 found that picking the best harness gives gains comparable to picking the best model. Source
Takeaway
In this exampleSwitching from chat to Claude Code changes the harness only, and the task goes from advice to a finished change.
In generalModel choice and harness choice weigh about the same. Teams that only compare models miss half of the result.
Next stepBefore switching models, try a stronger harness on the model you already have.
Example: what each one sees of the project
One task, "fix the failing test", and five programs. The strip under the project parts shows what each one sees. What it does not see, it guesses or hands back to you.
What it sees→only your text: no code, no test, no error
What it does→fills in the missing parts plausibly: invents files, functions, libraries
1 in 5→library names in LLM-written code do not exist: 19.7% across 576,000 code samples from 16 models (Spracklen et al.)
0–7% vs 31%→of real tasks solved: a model in a single pass, even with the right files, versus an agent with a "run, check" loop (Raju et al., 2026)
Takeaway
In this exampleAn agent runs the whole loop "run, read, fix, check" by itself. The others hand those steps to you.
In generalThe more steps a task needs in your systems, the more an agent gains. For one answer to one question a chat is faster and cheaper.
Next stepCount how often you copy between windows in a typical task. More than twice, try an agent.
How an AI agent works: a loop to the result
How does an AI agent work? It follows an agent loop: the model picks the next step, the harness carries it out with a tool and returns the result to the model. The loop repeats until the task is solved or a human is needed. This "reason, act, observe" scheme was described in the ReAct paper; coding agents such as Claude Code, Codex and Cursor work the same way.
1 · Think→the model reads the task, the context and earlier results, and picks a step
2 · Call a tool→the harness runs a command, reads a file, calls a service
3 · Look at the result→command output, an error text or a service reply goes back to the model
4 · Decide→done means exit; an error means back to step 1; a risky step means asking a human
Takeaway
In this exampleA test fails: the agent reads the error and makes a new edit without a command from you.
In generalA loop without checks turns into a series of guesses. That is why tests, linters and human approval of risky steps belong to the harness.
Next stepGive the agent a way to check itself: a test command, a done criterion, access to logs.
In this exampleAn email to a client is a chat. Finding a task in Jira, fixing the code and opening a merge request is an agent.
In generalOn a simple question an agent is slower and costs more: it reads context and takes steps. On a multi-step task it saves your hands.
Next stepPick one multi-step task of the week and give it to an agent whole.
FAQ
AI agent vs assistant: what is the difference?
An assistant carries out your request through set functions: one action at a time. An agent gets a goal, plans the steps itself, picks tools and checks the result.
AI agent vs chatbot?
A chatbot answers by a script or from a base of answers. An agent acts in your systems and checks the result.
AI agent vs LLM: what is the difference?
An LLM generates text. An AI agent is an LLM inside a harness that turns that text into actions and checks the result.
What is an agent harness?
All the code and configuration around the model that is not the model: loop, tools, context, rules, permissions and checks.
Harness vs framework?
A framework gives building blocks for writing an agent. A harness is the running layer that executes the loop and controls it.
How does an AI agent work?
In a loop: the model picks a step, the harness carries it out, the result returns to the model. The loop runs until the task is solved or a human is needed.
Is ChatGPT an agent?
In plain chat it is a chat app. In agent mode and in Codex the same model gets an action harness, which makes it an agent.