> Source: https://laravilt.com/docs/ai/chat/introduction

# AI Chat

Full-featured chat interface with streaming.

## Overview

| Topic | Description |
|-------|-------------|
| [Streaming](https://github.com/laravilt/laravilt/blob/HEAD/docs/ai/chat/streaming) | Real-time responses |
| [Sessions](https://github.com/laravilt/laravilt/blob/HEAD/docs/ai/chat/sessions) | Message persistence |
| [Vue Components](https://github.com/laravilt/laravilt/blob/HEAD/docs/ai/chat/vue-components) | Frontend integration |

## Features

- Real-time streaming responses
- Session management
- Provider/model selection
- @ mentions for resource context
- Message history
- Copy messages
- Markdown rendering
- Dark mode support

## Enable Chat in Panel

```php
<?php

use Laravilt\AI\AIManager;

$panel->ai(function (AIManager $ai) {
    $ai->chat(enabled: true)
        ->defaultProvider('openai')
        ->defaultModel('gpt-4o-mini')
        ->sessionTimeout(3600);
});
```

## @ Mentions

Reference resources in chat:

```
User: Show me @Products with low stock
AI: [Queries products with stock_quantity < 10]

User: Create a new @User with name John Doe
AI: [Creates user record]
```

## API Endpoints

```
POST /laravilt-ai/chat      # Send message
POST /laravilt-ai/stream    # Stream response
```

## Related

- [Streaming](https://github.com/laravilt/laravilt/blob/HEAD/docs/ai/chat/streaming) - Real-time responses
- [Sessions](https://github.com/laravilt/laravilt/blob/HEAD/docs/ai/chat/sessions) - Message persistence
