Principle:A5c ai Babysitter Orchestration Execution
| Knowledge Sources | |
|---|---|
| Domains | Agent_Orchestration, Event_Sourcing |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
A runtime model for executing agent orchestration via event-sourced task invocation, human approval breakpoints, and parallel effect batching.
Description
Orchestration Execution is the principle of driving a multi-step agent workflow through three runtime intrinsics:
- Task invocation — Calling a defined task via ctx.task produces an effect that is either resolved from the journal (replay) or dispatched as a new effect (first execution).
- Human approval breakpoints — Pausing execution at critical decision points for human review, with auto-approval in non-interactive mode and disambiguation for repeated breakpoints.
- Parallel effect batching — Running multiple lazy thunks concurrently, collecting all pending effects into a single batch for coordinated dispatch.
This addresses the problem of orchestrating non-deterministic agent calls in a deterministic, replayable, and auditable manner.
Usage
Use this principle when building agent orchestration runtimes that require deterministic replay, human-in-the-loop approval, and parallel quality checks. It is the execution bridge between task definitions and the journal-backed runtime.
Theoretical Basis
The three intrinsics form a complete execution algebra:
ctx.task(t, a) -> Effect[a] -- sequential effect
ctx.breakpoint(p) -> Effect[p] -- human gate effect
ctx.parallel.all([f1..fn]) -> [Effect[a1]..Effect[an]] -- batched effects
Effect resolution model:
- Each invocation produces a unique invocationKey derived from task ID, label, and args shape hash.
- The effect index checks for an existing record — if found, the result is replayed.
- If not found, a new EFFECT_REQUESTED event is appended to the journal, and an EffectRequestedError is thrown to pause the process.
- The runtime resolves the effect (e.g. dispatches to an agent), records the result, and re-executes the process from the start.
Breakpoint disambiguation: Repeated breakpoints with the same label get a per-call counter suffix, preventing collision-based silent approval inheritance.
Parallel batch collection: Thunks that throw EffectRequestedError have their pending actions collected into a single ParallelPendingError batch, enabling coordinated dispatch of all parallel effects at once.