--- title: "Work with files in AI Chats" slug: "upload-files-to-the-agents" description: "Learn how to attach files to AI Chats with Pigment Agents, including supported formats, size limits, and security checks for safe uploads." tags: ["Security Check", "AI Chats", "File Attachments"] updated: 2026-11-18T08:56:24Z published: 2026-11-18T08:56:24Z canonical: "kb.pigment.com/upload-files-to-the-agents" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.pigment.com/llms.txt > Use this file to discover all available pages before exploring further. # Work with files in AI Chats You can attach documents, spreadsheets, images and text files to your conversations with the Modeler, the Analyst and Custom Agents. The Agents can also generate files in the Chat, such as CSV or Markdown files, based on your instructions, and update, move or delete the files in your Application's Files. This article covers how Agents can work with files, which file types and sizes are supported, how the automatic security check works and what to do when a file fails the check. ## How to attach files to AI Chats 1. Open an [AI Chat](/v1/docs/pigment-agents#find-the-agents). 2. In the [chat input field](/v1/docs/pigment-agents#use-the-agents), select the **plus (+)** symbol. 3. Select **Attach a file** and browse for the file on your computer. It must be one of the file types listed in the next section. You can also share files to AI Chats from Pigment Files. For more information, see [Files in Pigment](/v1/docs/files-in-pigment#how-to-send-files-to-ai-chats). ## Supported file types for attachments The Agents accept the following file types: - **PDF, PPTX, DOCX**. The Agents can analyze text, tables and images, using spatial awareness to identify relationships between elements. - **CSV, XLSX**. The Agents can view data, formulas, workbooks and links between workbooks. They can import data into a Pigment Block. - **PNG, JPG**. The Agents can read charts, screenshots and photos of documents. - **TXT, MD**. The Agents can read plain text, such as notes, extracts and documentation. ## File size limits for attachments - You can attach up to 10 files at a time. - Each file must be less than 32 MB, or 4 MB for image files. - The total size of an upload must be less than 100 MB. > [!NOTE] > ℹ️ **Note** > > - Attached files are automatically deleted after 14 days unless you ask an Agent to [save them to Files](/v1/docs/files-in-pigment). > - Files sent from Pigment Files must also meet the above criteria. For more information, see [Files in Pigment](/v1/docs/files-in-pigment). ## Automatic security check All files under 4 MB in size automatically undergo a security check for text that reads as instructions to an AI Agent. ### How files fail the security check Before an AI Agent reads a file, the security check scans it for text that could instruct the Agent to expose or change data it should not access. If the check detects this type of text, the file fails the security check. This check runs only on files under 4 MB in size. Files over 4 MB are not checked. ### Troubleshoot a failed security check A file can fail the security check even when the content is safe. This can happen when a file contains text that resembles instructions for an AI Agent. Review the file for the following content: - AI prompts - AI policies or instruction templates - meeting notes that quote a chatbot - hidden text in a downloaded PDF - phrases such as “ignore previous instructions” or “you are an assistant” If the file still fails after this, submit a [Support ticket](https://support.pigment.com/en/support/tickets/new?ticket_form=ai_feature_request). ### Security check output #### For files under 4 MB Attaching a file under 4 MB results in one of two outcomes: - **The file is attached.** It passed the check and is ready for your Agent to use. - **The file is not added.** Pigment displays why it failed the check: - If it found text that reads as AI instructions, attaching the same file again gives the same result. [Troubleshoot the file](/v1/docs/upload-files-to-the-agents#troubleshoot-files-that-fail-the-check) and try again. - If the upload itself failed, check the [file type](/v1/docs/upload-files-to-the-agents#file-types-and-upload-constraints) and [size limits](/v1/docs/upload-files-to-the-agents#upload-constraints) and try again. #### For files over 4 MB The file is too large to check. Pigment allows you to upload it without running the check. Select **Continue with Caution** to attach it anyway, and treat its contents as unchecked. ### What the check does and doesn’t do Pigment checks attachments using [Model Armor](https://cloud.google.com/security/products/model-armor), a Google Cloud service that screens content passing between a user and an AI model. Pigment uses only its **prompt injection** and **jailbreak detection** filter, which identifies the instruction-like text outlined above. > [!CAUTION] > 🛡️ Warning > > The security check does not look for sensitive data, malicious links, malware or harmful content. ## Do AI Chat attachments count toward file storage? No. Files you attach to AI Chats are stored separately from assets you hold in [Pigment Files](/v1/docs/files-in-pigment). They do not count toward your workspace file storage and they do not appear in your file storage usage. For more information, see [Manage File Storage Limits](/v1/docs/manage-file-storage-limits). ## Generate files in AI Chats Ask the Modeler, the Analyst or a Custom Agent to create a file in the Chat, for example, "Write me a CSV of this month's headcount by team". The Agents can generate any of the file types listed in [Supported file types for attachments](/v1/docs/upload-files-to-the-agents#file-types-and-upload-constraints). The Agent returns a card in the Chat that shows the file name. You can also ask the Agent to save the file straight to an Application's Files, for example "Save this summary as a file in the Finance app". ### Preview and save a generated file 1. In the Chat, select the card presenting the file. 2. A preview of the file opens over the main pane. For file types other than `.md`, the pane tells you that preview is not available and that you can download the file to open it. 3. Select **Save to Application** to add the file to the Application's Files. > [!NOTE] > ℹ️ **Note** > > - Preview currently works for `.md` files only. > - Unsaved generated files are available in the Chat for seven days. To keep a file, save it to the Application's Files. > - You can preview a file from both the Chat and the Application's Files. For more information about managing saved files, see [Files in Pigment](/v1/docs/files-in-pigment). ## Update, move and delete files in AI Chats You can also ask the Modeler, the Analyst or a Custom Agent to update or delete files in the Application's [Files](/v1/docs/files-in-pigment), or move them to another Application. Specify the files by typing @ — it opens a drop-down of eligible options. For example: - "Add this week's numbers to the board notes file." - "Delete the old draft in Finance." When an Agent updates a file, it updates the file in place. References to the file in Chats and cell attachments keep working. ### Permissions and approval You can add and change files only in Applications where you have the [**Manage files**](/v1/docs/roles-permissions-access-rights#permissions) permission and [AI access to Files](/v1/docs/files-in-pigment#allow-agents-general-access-to-files) is turned on. To move a file to another Application, you need the **Manage files** permission there too. For more information about permissions, see [Files in Pigment](/v1/docs/files-in-pigment#permissions). > [!WARNING] > ⚠️ Important > > - The Agent asks for your approval before it edits or deletes a File, because shared files affect other users. > - Files have no version history and there is no undo, so treat updates and deletes as permanent. Deleted files can be recovered using [Application recovery](/v1/docs/recover-an-application-from-backup).