Open Agent Loops
API Reference

Agent

@open-agent-loops/core


type Agent = (call) => Promise<RunResult>;

Defined in: primitives/loop.ts:274

A self-contained agentic loop: a function that closes over its own standing config (model, memory, tools, system, …) and receives only the AgentCall per run. Define one by wrapping runAgent — or any loop with the same contract:

const agent: Agent = (call) => runAgent({ model, memory, system, ...call });

await agent({ sessionId: "t1", prompt: "hello" });   // drive it yourself
new Dispatcher({ agent });                           // or hand it to a driver

Parameters

ParameterType
callAgentCall

Returns

Promise<RunResult>

On this page