> ## Documentation Index
> Fetch the complete documentation index at: https://studio.bjanczak.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure the Studio assistant

> Enable chat, configure models and workers, use file context, and understand history retention.

Studio's assistant is optional and uses the models configured on the Laravel host. It can answer questions about attached files and use Studio actions according to the account's workspace permissions. An external AI client uses the separate [MCP integration](https://studio.bjanczak.com/mcp.md).

## Enable chat

Install the Laravel AI integration compatible with your Laravel version, configure your provider on the server, then apply the assistant migrations.

```bash theme={null}
composer require laravel/ai
php artisan vendor:publish --tag=media-studio-assistant-migrations
php artisan migrate
```

```php theme={null}
// config/media-studio.php
'assistant' => [
    'enabled' => true,
    'connection' => 'redis',
    'queue' => 'media-studio-ai',
    'max_active_runs' => 2,
    'models' => [
        'fast' => [
            'label' => 'Fast',
            'provider' => 'openai',
            'model' => env('STUDIO_ASSISTANT_MODEL'),
            'usage_weight' => 1,
        ],
    ],
],
```

Set `STUDIO_ASSISTANT_MODEL` to a model available to your provider account. Configure its server-side credentials and the Redis queue connection in Laravel.

```bash theme={null}
php artisan queue:work redis --queue=media-studio-ai
```

## Work with files

Open **AI chats** to resume a saved conversation or create a new one. When a preview is open, add **Current file** to give the assistant the specific file. You can also attach a file from the compose box and choose a configured model. While a response runs, **Stop** requests cancellation.

Try a prompt such as “Summarize this PDF and list the actions on page two” with the document attached, or “Find the latest version of the launch brief and open its preview” inside the right workspace. When an action cannot unambiguously identify a destination, specify the folder or file name. Previewing and mutating files both depend on the same workspace permissions.

## History and usage

Conversations are private to their owner within a workspace. The interface pages through saved chat history independently from the model's rolling context. An optional retention policy removes inactive or deleted chats according to server configuration. Configure [character appearance](https://studio.bjanczak.com/characters.md) separately and refer to [assistant history](https://studio.bjanczak.com/assistant-history.md) for cursor examples and context limits.

If chat is visible but a request stays queued, check the selected worker connection and queue. If the provider rejects a request, check the configured model, credential and input support for the file type.

For per-installation history cleanup, see [Assistant retention](https://studio.bjanczak.com/assistant-retention.md). To let users search files by meaning in the search modal, configure [semantic and hybrid search](https://studio.bjanczak.com/semantic-search.md).

## Context, attachments and actions

See [assistant context and tools](https://studio.bjanczak.com/ai/assistant-context.md) for exact input formats, size limits, current-file behavior, available actions and provider context bounds. Configure [models](https://studio.bjanczak.com/ai/providers.md) independently of visual tagging and OCR, and deploy the correct [worker](https://studio.bjanczak.com/ai/operations.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.