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

# LLM Protocol • Rust AI Agent SDK

> LlmProtocol: Protocol for LLM provider implementations.

# LlmProtocol

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

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

Protocol for LLM provider implementations.

## Methods

### `model`

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

Get the model name

### `chat`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async fn chat(&self, messages: &[LlmMessage]) -> Result<LlmResponse>
```

Chat with the LLM

**Parameters:**

| Name       | Type            |
| ---------- | --------------- |
| `messages` | `&[LlmMessage]` |

### `chat_with_tools`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async fn chat_with_tools(
        &self,
        messages: &[LlmMessage],
        tools: &[ToolSchema],
    ) -> Result<LlmResponse>
```

Chat with tools

**Parameters:**

| Name       | Type            |
| ---------- | --------------- |
| `messages` | `&[LlmMessage]` |
| `tools`    | `&[ToolSchema]` |

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust LLM" icon="microchip" href="/docs/rust/llm" />

  <Card title="Rust Providers" icon="server" href="/docs/rust/providers" />

  <Card title="Rust Failover" icon="shield" href="/docs/rust/failover" />
</CardGroup>
