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

# Embedding Agent Builder • Rust AI Agent SDK

> EmbeddingAgentBuilder: Builder for EmbeddingAgent.

# EmbeddingAgentBuilder

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

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

Builder for EmbeddingAgent.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    input["Input Data"] --> agent["Agent: EmbeddingAgentBuilder"]
    agent --> output["Output Result"]
    style agent fill:#8B0000,color:#fff
    style input fill:#8B0000,color:#fff
    style output fill:#8B0000,color:#fff
```

## Fields

| Name      | Type              | Description |
| --------- | ----------------- | ----------- |
| `name`    | `String`          | -           |
| `model`   | `String`          | -           |
| `config`  | `EmbeddingConfig` | -           |
| `verbose` | `bool`            | -           |

## Methods

### `new`

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

Create a new builder

### `name`

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

Set agent name

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `name` | `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 name

**Parameters:**

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

### `config`

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

Set embedding config

**Parameters:**

| Name     | Type              |
| -------- | ----------------- |
| `config` | `EmbeddingConfig` |

### `verbose`

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

Set verbose mode

**Parameters:**

| Name      | Type   |
| --------- | ------ |
| `verbose` | `bool` |

### `api_key`

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

Set API key

**Parameters:**

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

### `api_base`

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

Set API base URL

**Parameters:**

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

### `build`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn build(self) -> Result<EmbeddingAgent>
```

Build the EmbeddingAgent

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Agent" icon="robot" href="/docs/rust/agent" />

  <Card title="Rust Overview" icon="book-open" href="/docs/rust/overview" />

  <Card title="Rust Quickstart" icon="rocket" href="/docs/rust/quickstart" />

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

  <Card title="Rust Autonomy" icon="wand-magic-sparkles" href="/docs/rust/autonomy" />
</CardGroup>
