Routing
The router uses context—channel, active task, organization settings—to choose participants and when to stop. Prefer explicit arguments and return values over implicit global state when you extend flows.Lifecycle and guards
Components such aslifecycle_guard can block agent or scheduler work when the simulation is paused or not eligible to run. When that happens, align learner messaging with admin expectations so users are not left guessing.
Errors and degradation
If a model or dependency fails, return a clear, safe message to the user and log details server-side. Includex-correlation-id from the HTTP layer when tracing requests across logs.