Overview
A basic agent loop has four recurring stages:
- The harness supplies the model with instructions, relevant context, and a description of the
available tools.
- The model interprets the current objective and chooses either to respond or to call a tool.
- The harness executes the permitted action and returns the resulting observation, such as file
contents, terminal output, browser state, or a test result.
- The model reasons over the new observation and continues until it reaches a stopping condition,
requests human input, or exhausts a system limit.
This loop turns a text-generating model into a system that can affect a workspace. The same model can behave very differently under different harnesses because the surrounding system changes what information is available, how memory is stored, which tools can be called, how many steps are allowed, and what safety checks intervene.
The harness also narrows direction. A capable model can propose many possible approaches.
Instructions, tools, and execution constraints reduce that broad possibility space into actions that are useful for the current project. A good harness does not create the model's intelligence, but it can make that intelligence more useful, more focused, and more repeatable.