API Reference
RunGoalOptions
Defined in: goal/goal.types.ts:92
Inputs for a single runGoal run.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
base | RunGoalRunBase | Shared per-round run config (model, memory, sessionId, tools, system, …). | goal/goal.types.ts:98 |
goal | string | The objective, in natural language — handed to the grader each round. | goal/goal.types.ts:94 |
grader | Grader | Judges each round and decides done-or-continue (and the next prompt). | goal/goal.types.ts:96 |
maxRounds? | number | Hard cap on outer rounds (each round is one full inner run). Default 5. | goal/goal.types.ts:105 |
onRound? | (info) => void | Promise<void> | Observe each round's verdict as it settles (for logging/telemetry). | goal/goal.types.ts:115 |
prompt? | | string | Message | Message[] | The first round's prompt. Omitted → the run starts from the goal restated as the prompt. | goal/goal.types.ts:103 |
run? | RunFn | Override how each round runs (for tests). Default runAgent. | goal/goal.types.ts:107 |
signal? | AbortSignal | Cancel the whole goal loop. Forwarded to each round's inner run and re-checked at the top of each round, so an abort between rounds rejects promptly instead of starting another round. | goal/goal.types.ts:113 |