Quick reference · Agent harnesses

Agent harness field guide

A compact loop, boundary, and evaluation checklist. Use this while sketching an implementation or reviewing a trace.

The control loop

  1. Build a model request from the user task, instructions, relevant state, and the allowed tool schemas.
  2. Receive either a final answer or one or more proposed tool calls.
  3. Validate each call: known name, valid arguments, permitted action, remaining budget.
  4. Run the tool with a timeout and capture its structured result or safe error.
  5. Append the assistant call and matching tool result to history; ask the model for its next turn.
  6. Stop on final answer, cancellation, policy denial, error budget, time limit, or turn limit.

Minimum boundaries

Evaluation record

Record enough to reproduce and interpret a run
FieldExample
Task and environmentPrompt, fixture, repository snapshot, permissions
ConfigurationModel, prompt version, tools, MCP servers, limits
OutcomeValidator result, task success, partial completion
ProcessTool calls, errors, retries, final artifact
Cost and timeTokens, tool calls, wall-clock latency, model cost

See Lesson 4: Evaluate the whole harness and Lesson 9: Test and improve your harness.