Chat with your files, not about them
How attachments travel with a message, which formats work, and the difference between a model that reads a spreadsheet and one that guesses at it.
AgentJam Team3 min read

Most of the questions people bring to a chat are about something they already have: a PDF from a vendor, a CSV export, a photo of a whiteboard. Copying the contents into the message box works for a paragraph. It does not work for a forty-page deck or a spreadsheet with six thousand rows.
AgentJam lets you attach the files themselves. This post covers what happens between dropping a file into the chat and getting an answer that actually read it.
Supported formats
Attachments are accepted by MIME type and extension. The current list:
| Kind | Formats |
|---|---|
| Documents | PDF, plain text, Markdown, HTML, XML, JSON |
| Spreadsheets | CSV, Excel (.xlsx) |
| Images | JPEG, PNG |
Drag files anywhere over the chat, or use the paperclip in the composer. Each file appears as a chip above the message box with its name and a type icon. Remove one by pressing the small cross on its chip.
Files travel with the message
When you send, each attachment is encoded and sent as a file part alongside the text. The message that appears in your history shows the same chips, so a week later you can see exactly which files a given answer was based on.
const formData = new FormData();
formData.append("chatId", chatId);
formData.append("messages", JSON.stringify([{ role: "user", content: message }]));
attachments.forEach((file) => formData.append("files", file));
await api.post("/llm/chat", formData, {
headers: { "Content-Type": "multipart/form-data" },
});On the server, PDFs and text formats are passed to the model as document parts. Spreadsheets are converted to a compact text table first, because models reason about rows and columns far better than about raw cell XML. Images are passed as image parts so the model can read text in a photo or describe a diagram.
Reading, not guessing
The difference between a model that reads a file and one that guesses at it shows up immediately in the reasoning stream. A model that has the CSV says something like “the APAC row totals 1.63M.” A model that does not have it says “APAC revenue is typically the smallest region.” One of those is an answer. The other is a shrug in a suit.
A few habits make attachments more useful:
- Ask across files. “Compare the totals in the deck with the CSV” works because both files are in the same message. The model can hold them side by side.
- Name the thing you want. “Pull Q3 revenue by region” gets a table. “What do you think of this?” gets an essay.
- Follow up in the same thread. Later questions can refer to “the spreadsheet” and the model knows which one, because attachments are part of the conversation history.
Limits worth knowing
Very large files can exceed the model’s context window, so keep attachments focused on the pages or sheets you actually need. Scanned PDFs without a text layer are effectively images, which works for a page or two and gets expensive after that.
Where this goes next
The obvious extension is letting the model produce files, not just read them: a cleaned CSV, a summarized PDF, a chart. The upload path already carries the structure needed to return them. That is the next post.