Theo Docs
TheoKitTheoKit-SDKTheoUITheo PaaS
API reference

GoalEvent

Single event emitted while iterating a goal-driven loop. Five variants:

GoalEvent

Auto-generated from TypeDoc on each build. Edit the JSDoc in packages/sdk/src/ to change this page.

Single event emitted while iterating a goal-driven loop. Five variants:

  • turn_start — the agent is about to invoke send(). Emitted once per turn.
  • agent_response — the agent's send() resolved; carries the text reply.
  • judge_verdict — the auxiliary judge model evaluated the response. parseFailed: true indicates the judge returned a malformed reply (fail-safe verdict = continue, see ADR D121).
  • continuation — the judge ruled continue; carries the prompt that was sent on THIS turn (i.e., the input that produced the agent response just yielded). Useful for consumers who want to audit the exact continuation message that drove each iteration. The prompt for the NEXT turn is composed lazily at the start of that turn from the latest agent_response.content.
  • status_change — transition of the overall goal state. Always emitted once at start (active) and once at end (completed | failed | paused).

Signature

type GoalEvent

Kind

type

Source

packages/sdk/src/types/goal-events.ts:33

On this page