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

# Code Execution Step • Rust AI Agent SDK

> CodeExecutionStep: Represents a code execution step during research

# CodeExecutionStep

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

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

Represents a code execution step during research

## Fields

| Name         | Type                   | Description         |
| ------------ | ---------------------- | ------------------- |
| `input_code` | `String`               | The input code      |
| `output`     | `Option&lt;String&gt;` | The output (if any) |

## Methods

### `new`

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

Create a new code execution step

**Parameters:**

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

### `with_output`

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

Create with output

**Parameters:**

| Name         | Type                      |
| ------------ | ------------------------- |
| `input_code` | `impl Into&lt;String&gt;` |
| `output`     | `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/parity/extras.rs#L92">
  `praisonai/src/parity/extras.rs` at line 92
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Code Execution" icon="terminal" href="/docs/rust/code-execution" />

  <Card title="Rust Sandbox" icon="box" href="/docs/rust/sandbox" />
</CardGroup>
