> ## 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.

# Plan Step • Rust AI Agent SDK

> PlanStep: A single step in a plan.

# PlanStep

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

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

A single step in a plan.

## Fields

| Name                 | Type                   | Description                   |
| -------------------- | ---------------------- | ----------------------------- |
| `id`                 | `String`               | Step ID                       |
| `description`        | `String`               | Step description              |
| `status`             | `StepStatus`           | Step status                   |
| `dependencies`       | `Vec&lt;String&gt;`    | Dependencies (step IDs)       |
| `output`             | `Option&lt;String&gt;` | Output from this step         |
| `error`              | `Option&lt;String&gt;` | Error message if failed       |
| `estimated_duration` | `Option&lt;u64&gt;`    | Estimated duration in seconds |
| `actual_duration`    | `Option&lt;u64&gt;`    | Actual duration in seconds    |

## Methods

### `new`

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

Create a new plan step.

**Parameters:**

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

### `depends_on`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn depends_on(mut self, step_id: impl Into<String>) -> Self
```

Add a dependency.

**Parameters:**

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

### `estimated`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn estimated(mut self, seconds: u64) -> Self
```

Set estimated duration.

**Parameters:**

| Name      | Type  |
| --------- | ----- |
| `seconds` | `u64` |

### `start`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn start(&mut self) -> ()
```

Mark as in progress.

### `complete`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn complete(&mut self, output: Option<String>) -> ()
```

Mark as completed.

**Parameters:**

| Name     | Type                   |
| -------- | ---------------------- |
| `output` | `Option&lt;String&gt;` |

### `fail`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn fail(&mut self, error: impl Into<String>) -> ()
```

Mark as failed.

**Parameters:**

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

### `skip`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn skip(&mut self) -> ()
```

Mark as skipped.

### `is_ready`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn is_ready(&self, completed_steps: &[String]) -> bool
```

Check if step is ready to execute.

**Parameters:**

| Name              | Type        |
| ----------------- | ----------- |
| `completed_steps` | `&[String]` |

## Source

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