> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Step Result • Rust AI Agent SDK

> StepResult: Step result from workflow execution

# StepResult

> Defined in the [**workflows**](../modules/workflows) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Step result from workflow execution

## Fields

| Name      | Type                   | Description                          |
| --------- | ---------------------- | ------------------------------------ |
| `agent`   | `String`               | Agent name that produced this result |
| `output`  | `String`               | The output content                   |
| `success` | `bool`                 | Whether the step succeeded           |
| `error`   | `Option&lt;String&gt;` | Error message if failed              |

## Methods

### `success`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn success(agent: impl Into<String>, output: impl Into<String>) -> Self
```

Create a successful step result

**Parameters:**

| Name     | Type                      |
| -------- | ------------------------- |
| `agent`  | `impl Into&lt;String&gt;` |
| `output` | `impl Into&lt;String&gt;` |

### `failure`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn failure(agent: impl Into<String>, error: impl Into<String>) -> Self
```

Create a failed step result

**Parameters:**

| Name    | Type                      |
| ------- | ------------------------- |
| `agent` | `impl Into&lt;String&gt;` |
| `error` | `impl Into&lt;String&gt;` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/workflows/mod.rs#L29">
  `praisonai/src/workflows/mod.rs` at line 29
</Card>
