Skip to main content

Module orchestration

Module orchestration 

Source
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§

AgentStepSpec
A single unit of orchestrated agent work — what to run, independent of where it runs.
StepOutcome
The result of running one AgentStepSpec to completion.
WorkflowCheckpoint
Snapshot of a workflow’s completed steps at a step boundary.
WorkflowStepRecord
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§

AgentExecutor
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 stages as an independent chain.
execute_steps_parallel
Fan specs out across the executor, bounded by its concurrency_hint, preserving input order. A panicked branch becomes a failed StepOutcome without dropping the others.
execute_steps_parallel_resumable
Like execute_steps_parallel, but resumable: progress is journaled to store under workflow_id, so an interrupted run picks up from the last completed step.

Type Aliases§

PipelineStage
A pipeline stage: given the previous stage’s outcome (None before the first stage) and the original item, produce the next step to run — or None to stop this item’s chain early.