INTEGRITY Documentation

Harnesses

A harness is the loop that makes an agent behave like an agent instead of a single model call.

It is responsible for the turn-by-turn work around the model: building the prompt, loading memory, selecting tools, handling tool results, streaming responses, persisting messages, and deciding whether the agent should continue or stop.

You can build this loop yourself on top of the Agents SDK runtime, or use an opinionated harness like Project Think.

How harnesses fit

Harnesses sit on top of the Agents SDK runtime:

The runtime answers “where does this agent live and how does it stay durable?” The harness answers “what does this agent do on each turn?”

Choose an approach

Use a build-your-own harness when you need full control over the model call, message format, tool loop, or UI protocol. This is the right approach when you want to compose low-level APIs directly from the Agents SDK.

Use Project Think when you want an opinionated chat-agent harness with defaults for memory, workspace tools, streaming, lifecycle hooks, sub-agent RPC, and durable chat recovery.

Current harnesses

Project Think

An opinionated chat agent harness with built-in tools, persistent memory, lifecycle hooks, streaming, and sub-agent RPC.

What a harness usually owns

A harness usually owns:

Agents SDK runtime

Build your own harness directly on the Agent class.

Sessions

Store conversation context and memory across turns.

Durable execution with fibers

Recover long-running agent work after Durable Object eviction.