Skip to content

rulvar API reference


rulvar API reference / @rulvar/core / runAgent

Function: runAgent()

ts
function runAgent<S>(options): Promise<AgentResult<Out<S>>>;

Defined in: packages/core/src/runtime/agent-loop.ts:628

Runs one agent to a typed AgentResult. Never throws past policy: every failure mode becomes a typed status on the result.

Type Parameters

Type Parameter
S extends SchemaSpec

Parameters

ParameterType
optionsRunAgentOptions&lt;S&gt;

Returns

Promise&lt;AgentResult&lt;Out&lt;S&gt;&gt;&gt;