Attachments

The composer takes files by default: paperclip button, drag and drop, or paste. Images and PDFs go to the model as-is. Every other file is delivered as a file the agent reads or analyzes.

Options

Pass attachments: false to turn the feature off, or an object to narrow it.

OptionDefaultMeaning
enabledtruefalse is the same as attachments: false
maxFiles5Files per message
maxFileBytesper kind: 5 MB image, 10 MB PDF, 1 MB text, 10 MB data, 10 MB officeOne file, the smaller of this and the kind cap wins
maxTotalBytes20 MBAll files on one message
accepteverything supportedMIME types or type/* patterns, e.g. ["image/*"]

Supported files

KindFormatsHow the agent reads it
imagePNG, JPEG, WebP, GIFDirectly, it is one of the model's own modalities
pdfPDFDirectly, as a document input
textMarkdown, JSON, YAML, CSS, HTML, SVG, source files, logsread_attachment, a page at a time
dataCSV, TSV, Parquet, SQLiteColumn profile with the text, then code in the sandbox
officeWord (.docx), PowerPoint (.pptx), Excel (.xlsx)Extracted text and sheet profiles, then the file

How a file reaches the agent

For files beyond images and PDFs, the message carries a file handle and the agent reads the contents through tools.

  • read_attachment returns the file's text a page at a time, up to the readable-text cap in Limits.
  • Results include type, size, and table profiles with columns, inferred types, and row counts.
  • File contents, names, and table labels remain user input or tool results, never system instructions.
  • Agents with a sandbox receive the original file at uploads/<name> for analysis with code.
  • Excel sheets are profiled per sheet and read as CSV, with dates rendered as dates rather than serial numbers.
  • Parquet and SQLite have no text view and require a sandbox. Otherwise, the file is refused with an explanation.
  • A file that cannot be sent keeps its chip in the composer and says why, instead of vanishing.
  • Attachments are agent policy: when the dashboard disables them, the endpoint refuses files and the widget hides the attach button. See Security model.