The loop stays visible.
One model round trip per step. Tool calls run in your environment, then the runtime makes an explicit decision about continuing.
Read about the loopAn explicit TypeScript runtime for agents that need to do more than answer once. Bring your model, define the tools, and own the control flow around every run.
const run = runAgent({ model, prompt, tools: createCodingTools(env), maxSpendUsd: 2,});for await (const event of run.events) { inspect(event);}One model round trip per step. Tool calls run in your environment, then the runtime makes an explicit decision about continuing.
Read about the loopSet spend, token, and step limits for a run. Track cumulative usage and know why an agent stopped.
Explore eventsStart with bounded coding tools or provide your own. Configure approvals at the boundary where they belong.
Explore toolsUse any AI SDK v5 language model. Consume a typed event stream while work is happening, and await a final result when it’s done.
import { runAgent } from "not-another-harness";
const run = runAgent({
model,
prompt: "Review this change",
tools, maxSpendUsd: 1,
});
for await (const event of run.events) {
console.log(event.type);
}NAH is a working coding agent built with this same harness.
Meet NAH