Skip to main content

AgentFlow

Defined in the Workflows module.
Rust AI Agent SDK AgentFlow - Workflow definition with patterns Defines complex workflow patterns like Route, Parallel, Loop.

Fields

NameTypeDescription
stepsVec<FlowStep>-

Methods

new

fn new() -> Self
Create a new workflow

step

fn step(mut self, step: FlowStep) -> Self
Add a step Parameters:
NameType
stepFlowStep

agent

fn agent(self, agent: Agent) -> Self
Add an agent step Parameters:
NameType
agentAgent

run

async fn run(&self, input: &str) -> Result<String>
Execute the workflow Parameters:
NameType
input&str