pub enum WorkflowStepDef {
Run {
agent: String,
task: String,
output: Option<String>,
},
Parallel {
agents: Vec<String>,
task: String,
concurrency: Option<usize>,
},
Chain {
steps: Vec<WorkflowStepDef>,
},
ForEach {
items_key: String,
namespace: Option<String>,
agent: String,
task_template: String,
concurrency: Option<usize>,
},
Vote {
agents: Vec<String>,
question: String,
threshold: Option<f32>,
},
SetState {
key: String,
namespace: Option<String>,
value: Value,
},
}Expand description
A single step in a workflow.
Variants§
Run
Run a single agent with a task.
Fields
Parallel
Run multiple agents in parallel with the same task.
Fields
Chain
Run agents sequentially, passing results forward.
Fields
§
steps: Vec<WorkflowStepDef>Ordered sub-steps executed one after another.
ForEach
Fan-out: run an agent for each item in a SharedMemory key.
Fields
Vote
Vote: ask multiple agents and aggregate by threshold.
Fields
SetState
Set a value in SharedMemory.
Trait Implementations§
Source§impl Clone for WorkflowStepDef
impl Clone for WorkflowStepDef
Source§fn clone(&self) -> WorkflowStepDef
fn clone(&self) -> WorkflowStepDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkflowStepDef
impl Debug for WorkflowStepDef
Source§impl<'de> Deserialize<'de> for WorkflowStepDef
impl<'de> Deserialize<'de> for WorkflowStepDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorkflowStepDef
impl RefUnwindSafe for WorkflowStepDef
impl Send for WorkflowStepDef
impl Sync for WorkflowStepDef
impl Unpin for WorkflowStepDef
impl UnsafeUnpin for WorkflowStepDef
impl UnwindSafe for WorkflowStepDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more