harness
A harness is the software around a language model that decides what the model sees, carries out the actions it asks for, and checks with a person when needed. On its own, a model only reads text and writes a reply. The harness supplies everything else. It assembles the context for each request, runs tool calls such as reading files or executing commands, feeds the results back, and enforces permissions.
Try acting as the harness yourself and decide which of the model’s requests to carry out, which to check with the human, and which to refuse:
A model and its harness together form an agent, and the harness drives the agent loop that repeats these steps until a task is done. Coding tools such as Claude Code and Cursor are harnesses. The same model can behave quite differently in two harnesses because each one controls the context, tools, and safeguards the model gets.
The word isn’t fully standardized. Some writers use it for a whole product, and in classic machine learning an evaluation harness is a test suite for measuring models.
Related Resources
Tutorial
LLM Evaluation in Python: Build an Eval Harness From Scratch
Build an LLM evaluation harness in Python that scores model outputs with code-based checks and an LLM judge you calibrate against human labels.
For additional information on related topics, take a look at the following resources:
- AI for Beginners: Use Agents With Confidence (Course)
- Build an AI Agent From Scratch in Python (Course)
- Build an AI Agent From Scratch in Python: The Agentic Loop (Tutorial)
- AI Coding Agents Guide: A Map of the Four Workflow Types (Tutorial)
- How to Use Claude Code to Write and Debug Python (Tutorial)
- How to Add Features to a Python Project With Codex CLI (Tutorial)
- Getting Started With Claude Code (Course)
- LLM Evaluation in Python: Build an Eval Harness From Scratch (Quiz)
- Build an AI Agent From Scratch in Python: The Agentic Loop (Quiz)
- Exploring AI Coding Agent Workflows (Course)
- AI Coding Agents Guide: A Map of the Four Workflow Types (Quiz)
- How to Use Claude Code to Write and Debug Python (Quiz)
- Use Codex CLI to Enhance Your Python Projects (Course)
- How to Add Features to a Python Project With Codex CLI (Quiz)
Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.
By Sarah Jane Ross • Updated Nov. 30, 2026