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

# A GUI Event • Rust AI Agent SDK

> AGUIEvent: AGUI Base Event

# AGUIEvent

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

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

AGUI Base Event

## Fields

| Name         | Type                              | Description |
| ------------ | --------------------------------- | ----------- |
| `event_type` | `AGUIEventType`                   | Event type  |
| `Option`     | `:is_none")]`                     | Event data  |
| `data`       | `Option&lt;serde_json::Value&gt;` | Event data  |
| `Option`     | `:is_none")]`                     | Run ID      |
| `run_id`     | `Option&lt;String&gt;`            | Run ID      |

## Methods

### `run_started`

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

Create a run started event

**Parameters:**

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

### `run_finished`

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

Create a run finished event

**Parameters:**

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

### `run_error`

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

Create a run error event

**Parameters:**

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

### `text_delta`

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

Create a text delta event

**Parameters:**

| Name     | Type                      |
| -------- | ------------------------- |
| `run_id` | `impl Into&lt;String&gt;` |
| `delta`  | `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/ui.rs#L277">
  `praisonai/src/parity/ui.rs` at line 277
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust AGUI" icon="display" href="/docs/rust/agui" />

  <Card title="Rust Agent UI" icon="display" href="/docs/rust/agent-ui-agui" />
</CardGroup>
