Skip to content

Agent harness

The program that wraps a language model and makes it an agent: it gives the model tools, asks for your permission, keeps the session and decides what goes into its context.

An agent has three parts: the model (it predicts text), the harness (the program that gives it tools and permissions) and the context (what the model has in front of it right now).

Terminal harnesses: Claude Code, Codex CLI and Antigravity CLI. The same model can behave differently in different harnesses: which commands it may run, when it asks you first, which files it loads at the start.

When your agent asks "Can I run this command?", the harness is asking, not the model.

The difference that matters with data: an instruction you write ("don't delete files") is read by the model, and the model may not follow it. A permission you set in the harness (no rm, or no write credentials) holds whatever the model wants. Anything that must never happen belongs in permissions, not only in instructions.

Learn more

  • AI agent

    A program that pairs a language model with tools, such as terminal commands and files, to carry out a task in several steps: it reads its context, acts, looks at the result and repeats.

  • Context window

    Everything a language model has in front of it at a given moment: your instruction, the files it has read and the results of its tools. What isn't in the context, the model can't use.

  • MCP (Model Context Protocol)

    An open standard for connecting AI agents to outside tools and data sources, such as databases, APIs or documents, through one kind of connector.

  • Agent instructions file

    A text file in your project that the agent's harness loads at the start of every session, so the agent knows from the start what it always needs to know: rules, facts about the data and how to check its work.

  • Terminal

    A terminal is a window where you type commands for your computer instead of clicking. You type a line, press Enter, and the computer answers in text.

The whole glossary