Harness allows agents to connect to or provides resources to do its jobs including invoking tools, memory management, security, skills , human in the loop until the job is done. Agent also needs to keep learning over period of time.

Job of the harness os to get the model the right context at the right time for the given task.

Different agent harness techniques

  1. Prompt caching -

Many models supports prompt caching technique to reduce token costs. They consume new tokens when a new prompt is originally submitted. For future execution for the same prompt , only 10% of the new token is generated. Most of them are used from cache. Prompt caching lets a model provider reuse the work it already did on a prompt instead of reprocessing the same tokens on every request. Agent loops are the ideal case for this: the system prompt and tool definitions rarely change between turns, so a large chunk of every request is identical to the request before it.