pub enum StepKind {
ApiCall {
method: String,
url: String,
body: Option<Value>,
headers: Option<HashMap<String, String>>,
},
Script {
command: String,
args: Vec<String>,
cwd: Option<String>,
env: Option<HashMap<String, String>>,
timeout_secs: Option<u64>,
output_format: Option<ScriptOutputFormat>,
shell: Option<ShellType>,
},
AgentRun {
agent_id: String,
prompt: String,
tools: Vec<String>,
skills: Vec<String>,
model: Option<String>,
max_iterations: Option<u32>,
},
ToolCall {
tool_name: String,
input: Value,
agent_id: Option<String>,
},
Condition {
expression: String,
if_true: Box<StepKind>,
if_false: Option<Box<StepKind>>,
},
Checkpoint {
message: String,
},
WaitForInput {
message: String,
schema: Option<Value>,
},
Reply {
text: String,
buttons: Vec<Vec<ReplyButtonSpec>>,
buttons_from: Option<String>,
button_template: Option<ReplyButtonSpec>,
},
}Variants§
ApiCall
HTTP API call
Script
Shell script / command
Fields
§
output_format: Option<ScriptOutputFormat>AgentRun
Delegate to a Distri agent (sub-agent run)
Fields
ToolCall
Single tool invocation — not a full agent loop
Fields
Condition
Conditional branch — evaluates expression against context
Checkpoint
No-op / marker step (for documentation or manual checkpoints)
WaitForInput
Pause execution and wait for external/human input before continuing. The workflow saves state and stops. A resume call provides the input as the step result and continues from here.
Fields
Reply
Emit a channel reply (text + optional buttons). Rendered by the
gateway per channel. text / button fields support the standard
{input.x} / {steps.id.x} interpolation; button_template
fields additionally support {item.x} per buttons_from
element.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StepKind
impl<'de> Deserialize<'de> for StepKind
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 StepKind
impl RefUnwindSafe for StepKind
impl Send for StepKind
impl Sync for StepKind
impl Unpin for StepKind
impl UnsafeUnpin for StepKind
impl UnwindSafe for StepKind
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