Step Result • Rust AI Agent SDK

StepResult: Step result from workflow execution

StepResult

Defined in the workflows module.

Rust AI Agent SDK

Step result from workflow execution

Fields

NameTypeDescription
agentStringAgent name that produced this result
outputStringThe output content
successboolWhether the step succeeded
errorOption<String>Error message if failed

Methods

success

rust
fn success(agent: impl Into<String>, output: impl Into<String>) -> Self

Create a successful step result

Parameters:

NameType
agentimpl Into&lt;String&gt;
outputimpl Into&lt;String&gt;

failure

rust
fn failure(agent: impl Into<String>, error: impl Into<String>) -> Self

Create a failed step result

Parameters:

NameType
agentimpl Into&lt;String&gt;
errorimpl Into&lt;String&gt;

Source

View on GitHub

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