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

# Session Store • Rust AI Agent SDK

> SessionStore: Session store trait for different storage backends

# SessionStore

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

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

Session store trait for different storage backends

## Methods

### `load`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn load(&self, session_id: &str) -> Result<SessionData>
```

Load session data

**Parameters:**

| Name         | Type   |
| ------------ | ------ |
| `session_id` | `&str` |

### `save`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn save(&self, session: &SessionData) -> Result<()>
```

Save session data

**Parameters:**

| Name      | Type           |
| --------- | -------------- |
| `session` | `&SessionData` |

### `exists`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn exists(&self, session_id: &str) -> bool
```

Check if session exists

**Parameters:**

| Name         | Type   |
| ------------ | ------ |
| `session_id` | `&str` |

### `delete`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn delete(&self, session_id: &str) -> Result<()>
```

Delete a session

**Parameters:**

| Name         | Type   |
| ------------ | ------ |
| `session_id` | `&str` |

### `list`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn list(&self, limit: usize) -> Result<Vec<SessionInfo>>
```

List all sessions

**Parameters:**

| Name    | Type    |
| ------- | ------- |
| `limit` | `usize` |

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Sessions" icon="clock" href="/docs/rust/sessions" />

  <Card title="Rust Memory" icon="database" href="/docs/rust/memory" />
</CardGroup>
