Mo CherifAI, SOFTWARE & BUSINESS

What an AI agent harness does

Surviving the SaaSpocalypse Episode 3

An agent harness is the software that runs an AI model as part of a workflow. It decides what information to send the model, which tools the model can request, and what to do next. The model interprets the task and proposes a response or an action. The harness does the work of running the workflow around it.

Model

The model takes the information it sees on a turn and produces an answer or a request for an action. It can suggest looking up a record, but the lookup happens only if the harness gives it access to a tool and runs that tool. The rest of the harness can stay in place when you change models, though the model and tool formats need to be compatible.

What the model produces

InputThe request and relevant information.
ModelInterprets the input.
OutputAn answer or a request to act.
The harness handles the model’s output. The model doesn’t run the tool itself.

Context

Context is the information the model can see on the current turn. It can include the request, relevant instructions, recent messages, and retrieved records. The context window limits how much can fit at once. Connecting a data source doesn’t mean the model sees everything in it; the harness still has to fetch and select what’s useful.

What fits in one turn

Available informationMessages, instructions, and retrieved facts.
SelectThe harness picks what’s relevant.
Context windowThe model sees what was included.
Data outside the window may still exist; it just isn’t visible on this turn.

Agent loop

The harness can call the model more than once for the same task. If the model requests a tool and the operation is allowed, the harness runs it and puts the result into the next turn. The model can use that result to look something else up or prepare an answer. The loop can stop when the task is done, it reaches a limit, or the next action needs human review.

How a result becomes the next input

ModelRequests a tool.
HarnessChecks access and calls the tool.
Tool resultReturns a record, a result, or an error.
Next turn: The harness can send the result back to the model.
If no more work is needed, the loop stops.

Tools

A tool is an operation the harness can run, such as retrieving a record, opening a webpage, or calculating a total. An API, command-line interface, or MCP server can give the agent a defined operation and a known input. WebMCP lets a website expose supported actions to browser agents. These interfaces give the harness a way to act once a task has started; they don’t start the task on their own.

Two ways to use a tool

Structured operationLook up a deal by ID through an API, CLI, or MCP server.
Browser operationUse a site’s exposed actions through WebMCP, or interact with its interface.
The harness chooses among the operations it has been configured to use.

Sandbox

A sandbox is an isolated environment for running code or working with files. It can limit which files, secrets, and network destinations a process can reach. An agent could use it to compare two spreadsheet exports without running the code on the main system. A sandbox controls the execution environment; it does not grant permission to edit the system those spreadsheets came from.

An isolated workspace

InputsTwo permitted spreadsheet exports.
SandboxRun comparison code in isolation.
OutputA list of differences.
The sandbox limits access to its surroundings. It does not grant write access to the CRM.

Compaction

A long task can produce more messages and tool results than fit in the context window. Compaction reduces some of that material, often by summarizing it, so the current task can continue. A summary can leave out details. If an outcome depends on an exact figure or quote, the original evidence should still be available to check.

Making room in the current task

Long taskMany turns and tool results.
CompactReduce earlier material.
ContinueUse the shorter context for the next turn.
Keep original evidence available if details need to be checked.

Memory

Memory saves selected information across tasks for later use. It might store a personal preference, a team’s working definition, or a fact with a source and an expiry date. The harness can retrieve relevant entries for a new task. Unlike compaction, memory can carry information into a different task; retrieving it still doesn’t make it current or authoritative.

What a later task can recall

First taskLearns that a team uses Friday’s snapshot.
SaveStore the definition with its scope and source.
Later taskRetrieve it when preparing the next update.
The saved item stays separate from the current task’s context until it is retrieved.

Skills

A skill provides a reusable procedure: what to check, which tools to use, and what a good output should contain. For example, a pipeline-update skill might say to compare the latest numbers with Friday’s snapshot and explain each changed close date. A skill teaches the procedure; it doesn’t authorize the agent to use a tool or write to a record.

A repeatable procedure

Read the skillUse Friday’s snapshot.
Follow the stepsFind differences and check exceptions.
Prepare the resultShow the changes and their sources.
These are work instructions. Tool access is controlled separately.

Channels

A channel is where a person interacts with the agent. It could be a chat app, a voice call, or an interface inside another product. A task can start in one place and deliver its result where the person already works, provided the harness can route it there and the recipient has access.

Where the person meets the agent

ChatAsk and get a written answer.
VoiceSpeak and hear a response.
Inside an appReview the answer beside the work.
The interaction can look different even if the underlying workflow is the same.

Triggers

A trigger starts a task when a condition occurs. A schedule can start a pipeline check on Monday morning; an event from the CRM can start one when a deal changes. A trigger starts the work, a tool helps carry it out, and a channel can deliver the result. One workflow can use all three.

What can start the job

ScheduleRun the check on Monday morning.
EventRun the check when a deal changes.
Either trigger can start the same workflow without someone opening a chat.

Approvals

An agent may be permitted to read deal records and draft a summary, while a change to a close date requires review. It can propose a specific edit and show the evidence. An authorized person decides whether to approve it. Before writing, the harness or system that owns the record checks the approval and permissions outside the model and can verify that the record hasn’t changed in the meantime. Logging what was decided and what was written makes the outcome traceable.

Before the record changes

ProposeShow the edit and its evidence.
ReviewAn authorized person approves or rejects it.
ApplyVerify permission, write if allowed, and log it.
Approval and access are verified outside the model.