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

# Fast Context Config • Rust AI Agent SDK

> FastContextConfig: Configuration for FastContext.

# FastContextConfig

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

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

Configuration for FastContext.

## Fields

| Name             | Type                   | Description                      |
| ---------------- | ---------------------- | -------------------------------- |
| `workspace_path` | `Option&lt;String&gt;` | Workspace path                   |
| `model`          | `String`               | LLM model for intelligent search |
| `max_turns`      | `usize`                | Maximum search turns             |
| `max_parallel`   | `usize`                | Maximum parallel tool calls      |
| `timeout`        | `f64`                  | Timeout per tool call in seconds |
| `cache_enabled`  | `bool`                 | Enable caching                   |
| `cache_ttl`      | `u64`                  | Cache TTL in seconds             |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new() -> Self
```

Create a new config.

### `workspace_path`

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

Set workspace path.

**Parameters:**

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

### `model`

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

Set model.

**Parameters:**

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

### `max_turns`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn max_turns(mut self, turns: usize) -> Self
```

Set max turns.

**Parameters:**

| Name    | Type    |
| ------- | ------- |
| `turns` | `usize` |

### `max_parallel`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn max_parallel(mut self, parallel: usize) -> Self
```

Set max parallel.

**Parameters:**

| Name       | Type    |
| ---------- | ------- |
| `parallel` | `usize` |

### `timeout`

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

Set timeout.

**Parameters:**

| Name      | Type  |
| --------- | ----- |
| `timeout` | `f64` |

### `cache_enabled`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn cache_enabled(mut self, enabled: bool) -> Self
```

Enable/disable caching.

**Parameters:**

| Name      | Type   |
| --------- | ------ |
| `enabled` | `bool` |

### `cache_ttl`

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

Set cache TTL.

**Parameters:**

| Name  | Type  |
| ----- | ----- |
| `ttl` | `u64` |

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Context Management" icon="layer-group" href="/docs/rust/context-management" />

  <Card title="Rust Token Management" icon="coins" href="/docs/rust/token-management" />

  <Card title="Rust Configuration" icon="gear" href="/docs/rust/configuration" />

  <Card title="Rust Installation" icon="download" href="/docs/rust/installation" />
</CardGroup>
