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

# chat • Rust AI Agent SDK

> chat: Chat with the LLM

# chat

<div className="flex items-center gap-2">
  <Badge color="blue">Async</Badge>
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**LlmProtocol**](../classes/LlmProtocol) class in the [**protocols**](../modules/protocols) module.

Chat with the LLM

## Signature

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

## Parameters

<ParamField query="messages" type="&" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Result<LlmResponse>">
  The result of the operation.
</ResponseField>
