Open Agent Loops
API Reference

Grader

@open-agent-loops/core


type Grader = (ctx) => 
  | Grade
| Promise<Grade>;

Defined in: goal/goal.types.ts:67

Judges a round and decides whether the goal is met.

Parameters

ParameterTypeDescription
ctxGradeContextThe round's snapshot.

Returns

| Grade | Promise<Grade>

The Grade for this round.

Remarks

Parallels StopCondition: a function, sync or async, the caller owns. Returning { done: true } ends the loop; { done: false, feedback } drives the next round with feedback as the prompt.

On this page