Skip to main content

Module workflow

Module workflow 

Source
Expand description

Workflow execution engine — Sequential, Parallel, Loop agent orchestration.

This module provides dispatch_agent(), the central routing function that handles all AgentKind variants. LLM agents are dispatched to the agentic loop; workflow agents are dispatched to their respective executors.

§Architecture

WorkflowContext carries all shared resources as owned/Arc types (no lifetimes). This is critical for the Parallel executor which needs to tokio::spawn child tasks (requiring 'static). When dispatching to the agentic loop, a temporary LoopContext is created with borrows scoped to that call.