Agent Flow • Rust AI Agent SDK
AgentFlow: AgentFlow – Workflow definition with patterns Defines complex workflow patterns like Route, Parallel, Loop.
AgentFlow
Defined in the workflows module.
Rust AI Agent SDK
AgentFlow – Workflow definition with patterns Defines complex workflow patterns like Route, Parallel, Loop.
Fields
| Name | Type | Description |
|---|---|---|
steps | Vec<FlowStep> | – |
Methods
new
fn new() -> SelfCreate a new workflow
step
fn step(mut self, step: FlowStep) -> SelfAdd a step
Parameters:
| Name | Type |
|---|---|
step | FlowStep |
agent
fn agent(self, agent: Agent) -> SelfAdd an agent step
Parameters:
| Name | Type |
|---|---|
agent | Agent |
run
async fn run(&self, input: &str) -> Result<String>Execute the workflow
Parameters:
| Name | Type |
|---|---|
input | &str |
Source
View on GitHubpraisonai/src/workflows/mod.rs at line 313