Expand description
Programmable, deterministic multi-agent orchestration.
Today an agent fans work out only by model-driven delegation (the LLM
decides to call the task / parallel_task tool). This module adds a
programmable layer: a developer expresses fan-out / pipelines /
verification panels as code, so the orchestration is reproducible,
testable, budget-bounded, and (later) resumable — independent of what the
model chooses to do.
§The framework / host boundary
Everything here is written against one seam, AgentExecutor: “run this
step, give me the result.” The framework owns the grammar (which steps,
how they compose, the concurrency hint, the data contracts
AgentStepSpec / StepOutcome) and ships a default executor that runs
every step locally. The placement of those steps across a cluster —
transport, scheduling, where a step actually executes — belongs to the
host, which implements AgentExecutor. The combinators never
observe where a step ran, so the same orchestration scales from one process
to a cluster without change.
The in-box implementation is crate::tools::TaskExecutor.
Structs§
- Agent
Step Spec - A single unit of orchestrated agent work — what to run, independent of where it runs.
- Budget
Snapshot - An immutable view of a
WorkflowBudgetledger. - Step
Outcome - The result of running one
AgentStepSpecto completion. - Workflow
- A cheaply-clonable (all-
Arc) typed orchestration facade. - Workflow
Budget - A shared, workflow-scoped token ledger that also acts as a
BudgetGuard. - Workflow
Builder - Builder for a
Workflow. The executor is mandatory (it is the seam to the host’s placement / scheduling); everything else is optional. - Workflow
Checkpoint - Snapshot of a workflow’s completed steps at a step boundary.
- Workflow
Step Record - One completed step within a workflow.
Enums§
- Loop
Decision - What an
execute_looppredicate decides after seeing a round’s outcomes. - Workflow
Event - Workflow-level milestone stream, distinct from the per-step
AgentEventstream the combinators already emit.
Constants§
- WORKFLOW_
CHECKPOINT_ SCHEMA_ VERSION - Schema version. Bumped on incompatible format changes; loads from a future
version are rejected (see
WorkflowCheckpoint::ensure_loadable).
Traits§
- Agent
Executor - Runs agent steps — the seam between the framework’s orchestration grammar and the host’s placement / transport / scheduling.
Functions§
- execute_
loop - Run rounds until the predicate says
Stop, a round is asked to run no specs, ormax_iterationsis reached — whichever comes first. Each round is a barrier (execute_steps_parallel);nextreceives the just-completed round’s outcomes and decides whether (and with what) to continue. Returns the last round’s outcomes (empty ifinitialwas empty). - execute_
pipeline - Run each item through
stagesas an independent chain. - execute_
steps_ parallel - Fan
specsout across the executor, bounded by itsconcurrency_hint, preserving input order. A panicked branch becomes a failedStepOutcomewithout dropping the others. - execute_
steps_ parallel_ resumable - Like
execute_steps_parallel, but resumable: progress is journaled tostoreunderworkflow_id, so an interrupted run picks up from the last completed step.
Type Aliases§
- Pipeline
Stage - A pipeline stage: given the previous stage’s outcome (
Nonebefore the first stage) and the original item, produce the next step to run — orNoneto stop this item’s chain early.