Class LoopController

Configurable ReAct loop controller.

Drives a generate → act → observe cycle, delegating LLM inference and tool execution to the caller-provided LoopContext. The loop terminates when:

  1. The LLM returns no tool calls (natural stop), or
  2. maxIterations is exceeded, or
  3. A tool fails and failureMode is 'fail_closed'.

All intermediate events are yielded so callers can stream output to the user or record an audit trace.

Constructors

Methods

Constructors

Methods