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 (书安OS), 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.
- Step
Outcome - The result of running one
AgentStepSpecto completion. - Workflow
Checkpoint - Snapshot of a workflow’s completed steps at a step boundary.
- Workflow
Step Record - One completed step within a workflow.
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_
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.