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

# Web Config • Rust AI Agent SDK

> WebConfig: Configuration for web search and fetch capabilities

# WebConfig

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

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

Configuration for web search and fetch capabilities

## Fields

| Name              | Type                | Description                                   |
| ----------------- | ------------------- | --------------------------------------------- |
| `search`          | `bool`              | Enable web search                             |
| `fetch`           | `bool`              | Enable web fetch (retrieve full page content) |
| `search_provider` | `WebSearchProvider` | Search provider                               |
| `max_results`     | `usize`             | Maximum search results                        |

## Methods

### `new`

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

Create a new web config

### `no_search`

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

Disable search

### `no_fetch`

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

Disable fetch

### `provider`

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

Set search provider

**Parameters:**

| Name       | Type                |
| ---------- | ------------------- |
| `provider` | `WebSearchProvider` |

### `max_results`

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

Set max results

**Parameters:**

| Name  | Type    |
| ----- | ------- |
| `max` | `usize` |

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Configuration" icon="gear" href="/docs/rust/configuration" />

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

  <Card title="Rust Web" icon="globe" href="/docs/rust/web" />

  <Card title="Rust Web Search" icon="search" href="/docs/rust/web-search" />
</CardGroup>
