> For the complete documentation index, see [llms.txt](https://vibemx.gitbook.io/neuronai-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vibemx.gitbook.io/neuronai-studio/agents/attachments.md).

# Attachments

The Playground and workflow test harness support multimodal attachments — images, audio, video, PDFs, and plain text files.

## Supported file types

Configured in `config/neuronai-studio.php` under `attachments.allowed_mimes`:

| Category  | MIME types                                           |
| --------- | ---------------------------------------------------- |
| Images    | `image/jpeg`, `image/png`, `image/gif`, `image/webp` |
| Audio     | `audio/mpeg`, `audio/wav`, `audio/ogg`               |
| Video     | `video/mp4`, `video/webm`                            |
| Documents | `application/pdf`, `text/plain`                      |

## Upload flow

```mermaid
sequenceDiagram
    participant UI as Composer
    participant API as AttachmentController
    participant Storage as Laravel Disk
    participant Runner as AgentRunner

    UI->>API: POST /studio/attachments
    API->>Storage: store file
    API-->>UI: attachment URL + metadata
    UI->>Runner: message + attachment refs
    Runner->>Runner: MessageFactory builds multimodal message
```

> **Screenshot pending:** Composer with a PDF or image attached.
>
> Asset path: `docs/assets/screenshots/agents-attachments.png` Capture: Playground composer with attachment chip visible — dark theme, 1440×900

## Configuration

```php
'attachments' => [
    'disk' => env('NEURONAI_STUDIO_ATTACHMENTS_DISK', 'local'),
    'path' => env('NEURONAI_STUDIO_ATTACHMENTS_PATH', 'neuronai-studio/attachments'),
    'max_size_kb' => (int) env('NEURONAI_STUDIO_ATTACHMENTS_MAX_KB', 10240),
    'allowed_mimes' => [ /* ... */ ],
],
```

| Env variable                         | Default                       | Description             |
| ------------------------------------ | ----------------------------- | ----------------------- |
| `NEURONAI_STUDIO_ATTACHMENTS_DISK`   | `local`                       | Laravel filesystem disk |
| `NEURONAI_STUDIO_ATTACHMENTS_PATH`   | `neuronai-studio/attachments` | Storage subdirectory    |
| `NEURONAI_STUDIO_ATTACHMENTS_MAX_KB` | `10240`                       | Max file size (10 MB)   |

## Usage tips

* Attach a screenshot when asking an agent to analyze UI issues
* Send PDFs for document Q\&A workflows
* Ensure your chosen model supports the attachment modality (vision models for images)

## Workflow test harness

The workflow test harness uses the same upload endpoint and MIME validation as the Playground. Uploaded files are merged into `state.attachments` at run start (or resume) and survive across **Loop** iterations for autonomous agent workflows.

Agent and LLM nodes read attachments through `MessageFactory::resolveMessageWithAttachments()`. Pair with the **Autonomous Lead Qualification** template for a full loop + tools + attachments example — see [Templates](/neuronai-studio/workflows/templates.md#autonomous-lead-qualification).

## Related

* [Playground & Threads](/neuronai-studio/agents/playground-and-threads.md)
* [Configuration](/neuronai-studio/reference/configuration.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://vibemx.gitbook.io/neuronai-studio/agents/attachments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
