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.

Diagram

Input Data

Agent: AgentFlow

Output Result

Fields

NameTypeDescription
stepsVec<FlowStep>–

Methods

new

rust
fn new() -> Self

Create a new workflow

step

rust
fn step(mut self, step: FlowStep) -> Self

Add a step

Parameters:

NameType
stepFlowStep

agent

rust
fn agent(self, agent: Agent) -> Self

Add an agent step

Parameters:

NameType
agentAgent

run

rust
async fn run(&self, input: &str) -> Result<String>

Execute the workflow

Parameters:

NameType
input&str

Source

View on GitHub

praisonai/src/workflows/mod.rs at line 313


Related Documentation