Documents and attachments
How Fabric Agents handles PDFs, Word, Excel, PowerPoint, images, and plain text attachments — MarkItDown conversion, inline base64 images, and paste-to-file.
Drag-drop a file into the chat, paste it, or use @file — Fabric Agents will attach it and give the agent a way to read it. The mechanics differ by file type.
Supported types
| Category | Extensions | How the agent sees it |
|---|---|---|
| Images | .png, .jpg, .jpeg, .gif, .webp, .svg, .bmp, .avif | Base64-encoded, inlined in the message. Vision-capable models see the pixels directly. |
| PDFs | .pdf | Base64-encoded, plus a text extraction that the agent can read. |
| Office | .doc, .docx, .xls, .xlsx, .ppt, .pptx | Converted to Markdown via MarkItDown when the agent reads them. Original stays attached. |
| Text / code | .txt, .md, .json, .csv, .html, .ts, .py, … | Inlined as UTF-8. Truncated above 512 KB with a notice. |
| Anything else | – | Attached as a file path; agent gets the name, MIME type, and size. |
What the agent receives
For every attachment, the agent gets:
name— the sanitised filename.path— absolute path to the stored copy inside the session'sattachments/folder.base64— inline data for images, PDFs, and Office files.text— inline UTF-8 for text files.thumbnailBase64— small preview used by the UI and by the agent when it wants a quick look.
Attachments are copied into the session folder:
~/.fabric-agent/workspaces/{ws}/sessions/{session-id}/attachments/{uuid}_{filename}Copying means deleting the source file later doesn't break the session — the attachment travels with the conversation.
MarkItDown for Office documents
Word, Excel, and PowerPoint files run through MarkItDown the first time the agent reads them:
.docxbecomes structured Markdown with headings, lists, tables, code blocks..xlsxbecomes one Markdown table per sheet with sheet names as headings..pptxbecomes one Markdown section per slide, with slide titles as headings and speaker notes as call-outs.
The conversion is lazy — MarkItDown runs on read, and the result isn't persisted. If you edit the original file externally and re-read, you see the new content.
PDFs
PDFs are attached as base64 (for vision and full-fidelity rendering) plus a text extraction (for the agent to quote and cite). Scanned PDFs with no embedded text will be readable as images by vision-capable models, but the agent can't search their contents — Fabric Agents doesn't OCR images by default.
Images
Images are attached as base64. Vision-capable models (Claude with vision, GPT-4o, Gemini with vision, local multimodal models like Gemma 4) see the pixels directly and can describe, transcribe, or reason about them.
Before sending to the model, the app resizes oversized images to stay within the provider's limits:
- Max file size to inline: 5 MB per image.
- Max dimension: 8000 pixels on the longest side.
- Over-size images are resized (longest side scales down) and re-encoded as JPEG with progressive quality degradation until they fit.
Attachments above 20 MB (any type) are rejected outright.
Text and code files
Text files are inlined as UTF-8. Above 512 KB, the file is truncated and a notice is appended to the content so the agent knows what happened:
...
[truncated at 512KB. Original file: ~/Downloads/big-log.txt — ask me to read a specific section]For huge files, ask the agent to use Read with an offset and limit — far more efficient than inlining the whole thing.
Paste-to-file
Paste several paragraphs of text into the chat and it goes in as a regular message. Paste a lot (more than 400 lines or 20 000 characters), and Fabric Agents automatically converts it into a file attachment named pasted-{timestamp}.txt. That keeps the input responsive and the conversation history readable.
Behaviour is the same whether you paste from the clipboard, drag from another app, or drop in a whole file.
Using attachments in prompts
Three patterns cover most cases:
Attach and ask
@file:./quarterly-report.docx Summarise this in three bullet points.Extract structured data
@file:./invoices/*.pdf Extract vendor, amount, and due date from each and return a datatable.With glob expansion, a single message can attach a batch of files. The agent reads them in parallel.
Iterate with edits
@file:./draft.md Rewrite this for a technical audience and keep the structure.Agent reads, rewrites, writes back with Write — the original attachment stays on disk as a reference.
Related
- Interactions — attachment UI and paste thresholds.
- Rich output — how the agent's responses get rendered (code, diagrams, diffs, data tables).
- Data Tables — rendering structured data the agent extracts.
- PDF Preview — the in-app PDF viewer.
Deeplinks
Launch Fabric Agents from anywhere using the fabricagents:// URL scheme — open sessions, create new chats with prefilled prompts, and navigate to settings or sources.
Rich output
Every inline rendering Fabric Agents produces — Markdown, code with syntax highlighting, diagrams, diffs, data tables, previews — and when each one shows up.