01Lifecycle (confidence loop)
Plan
↓
Execute
↓
Critique
↓
Validate
↓
(next iteration or COMPLETED / FAILED)Those stage names match confidence-loop.ts. There is no Continue/Finish stage — the loop breaks when validate/critique scores pass successScore or maxIterations is exhausted. Optional stage: observe.
02Product deep dive
For the HazelJS-specific entity page, see Agent Runtime in Agent OS.
03AgentRuntime with loop options
typescript
import { AgentRuntime, createMockLlmProvider } from '@hazeljs/agent';
const runtime = new AgentRuntime({
llmProvider: createMockLlmProvider(),
enableRetry: false,
});
runtime.registerAgent(SupportAgent);
const result = await runtime.execute('support-agent', 'Check open orders', {
maxSteps: 8,
loop: { maxIterations: 8, successScore: 95 },
});