Skip to content

Upload Files in Chat

Drop a file into a Pinchy chat and the agent receives its content directly — no copy-pasting, no separate upload step.

Saved to the workspace — the agent reads them on demand

  • PDF (with text extraction and vision analysis)
  • Text data: .txt, .md, .csv, .json, .yaml/.yml
  • Images: JPEG, PNG, WebP, GIF, HEIC/HEIF (also sent inline to vision models)

Drop a .csv or a .md just like a PDF: the file lands in the agent’s workspace and the agent reads the whole thing on demand. This is the path for data-analysis work, where the agent needs the file as a file it can re-read, slice, and reference.

Sent inline as text — content pasted into the conversation, not stored

  • Microsoft Word (.docx) — text extracted at upload time
  • Source code: .ts, .js, .tsx, .jsx, .py, .go, .rs, .sh, .sql, .html, .css, .xml, .toml, and similar

These are pasted into the conversation as text rather than stored, so the agent sees the content immediately without a read step.

15 MB per file.

For a workspace file (PDF, image, or text data), two things happen:

  1. The file is saved to the agent’s workspace at uploads/<filename>. The agent reads it on demand from there.
  2. Images are also sent inline to the LLM when the model supports vision, so the agent can “see” an image without a separate read step.

Word documents and source code are the exception: their content is sent inline as text and not stored in the workspace.

For PDFs, Pinchy automatically picks the best vision-capable model available in your provider configuration. Anthropic Claude and Google Gemini handle PDFs natively; other vision-capable models fall back to a text-and-image extraction step.

For Microsoft Word .docx files, Pinchy converts the document to Markdown at upload time — headings, lists, and GitHub-flavored tables all survive — and ships it directly to the agent as text. No vision model required. Embedded images are replaced with a [image] placeholder until a future release adds vision-based descriptions.

Workspaces are isolated per agent: file-reading tools only see files in that agent’s own workspace, never another agent’s files or the host system. The user-attached file lives in uploads/; if the agent has Create files permission and produces a deliverable (an export, a draft, a generated report), it writes to the sibling workbench/ directory instead — that separation keeps “what the user gave me” and “what I made” easy to tell apart. See Agent Workspaces for the full picture.

Chat isn’t the only door into uploads/. An agent with email Read access can pull attachments out of a connected mailbox with email_get_attachment, and they land in this same uploads/ folder — readable with the same tools described above. This is how an “invoice email → Odoo” workflow chains together: email_get_attachment downloads the invoice PDF into uploads/, the agent reads it the same way it would a chat-uploaded PDF, and odoo_attach_file attaches it to the matching Odoo record. See Attachments from email and Connect Email for the full flow.

Files uploaded to a shared agent are visible to all users with access to that agent — they live in a workspace that everyone with access to the agent shares. Pinchy shows a reminder of this in the upload UI. If you’re uploading sensitive content, use a personal agent instead. See Agent Workspaces for the privacy implications.

Pinchy renders an inline preview next to your chat message:

  • PDFs show a small first-page thumbnail. Click to open the browser’s PDF viewer in a modal — zoom, page-nav and download all work as you’d expect.
  • Images render as a thumbnail. Click to enlarge.

Both previews survive page reloads — the file lives in the agent workspace, not in browser memory, so it’s still there hours or days later.

Files flow the other way too. When an agent produces or fetches a file — an email attachment it downloaded, a document it wrote — it hands the file straight back to you in chat as a downloadable chip, right next to its reply. PDFs and images preview inline exactly like your own uploads; CSV, Excel (.xlsx), text, Markdown and JSON files show up as a chip that downloads the file when you click it. No “it’s in your workspace, go find it” — the file is one click away in the conversation.

Today this happens two ways: whenever an agent downloads an email attachment with email_get_attachment, and whenever an agent generates a file from data it already has. Both land in the workspace and appear as a chip you can open. One exception: an email attachment Pinchy can’t serve to a browser safely — a Word document, an old .xls, a ZIP, an unknown binary — is saved to the workspace without a chip.

Delivered files are scoped to the chat they were delivered in: only you can download a file an agent handed to your conversation, even on a shared agent where several people talk to the same agent. The chip reappears after a reload, just like your own attachments, because the authorization to download it is recorded durably — not held in browser memory.

An agent with Create files permission can turn tabular data it already holds — records it looked up, numbers it calculated, a list it assembled — into a downloadable file, without you needing any special syntax. Just ask: “export these as a CSV,” “make me a PDF report of this,” “put the ledger in a spreadsheet.”

Three formats are supported:

  • CSV — UTF-8 with a BOM, so it opens correctly in Excel.
  • XLSX — a single-sheet Excel workbook. The agent can give the sheet a title.
  • PDF — a simple report: a heading followed by the table.

This is a generic capability, not a per-integration exporter — it works the same way no matter where the data came from (a knowledge base search, an Odoo query, numbers the agent worked out itself). It doesn’t do multi-sheet workbooks, styled PDF layouts, or bundling several files into a ZIP.

Generated files are capped at 50,000 rows and 10 MB, and land in the agent’s workbench/ directory — the same zone pinchy_write uses for anything an agent produces. That means generating a file is gated on the same Create files permission described in Agent Permissions: an agent that can’t write files can’t generate them either.

Generating never overwrites an existing file: if export.csv already exists in the workbench, the new file becomes export-2.csv (then export-3.csv, and so on), and the chat reports the name actually used.

Files you were handed earlier — including in other conversations with the same agent — keep exactly the content they had when they were delivered. That holds against more than the naming rule above: a download link remembers a checksum of what it handed you, so it will not quietly serve something else later. On a shared agent, where every member’s chats write into one workspace, “something else” could otherwise be a file from a conversation you are not part of.

What that means in practice depends on who replaced the file:

  • Your own agent, in your own conversation — say you ask it to delete a file and generate it again under the same name. You get a new download chip for the new file, and it is the new contents you get.
  • Anything else — another member’s conversation writing to the same name, or the file being deleted outright. Your link stops working: the chip returns “not found” rather than newer data you were never handed. Ask the agent for the file again and you get a fresh one.

Pinchy validates every uploaded file against its actual content, not just the browser-reported MIME type. A file renamed to .pdf that contains executable code will be rejected. Filenames are also sanitized before being written to disk.

Paste a screenshot, or drag a PDF straight out of a viewer, and the browser hands us blob — no name, no extension. Pinchy names those itself, from the moment you sent the file and what it actually turned out to be: upload-2026-08-20-1432.pdf. The time of day is in there because a working day produces a lot of these, and a date alone would leave you with a list you still can’t tell apart.

A name you chose is kept as it is. The exception is a name that says nothing either: image.png, download.pdf, untitled.pdf and the like are treated exactly like blob, because the stem tells you no more than the browser’s own placeholder does. And a name you chose that arrived without an extension keeps its stem and gains the extension its contents call for — Scan001 becomes Scan001.pdf, so it opens.

This is why a pasted file can appear in uploads/ under a different name than the one you saw on your desktop. The chat chip, the agent and the workspace all use the stored name, so they always agree.