Attaching Files To Chat
Work with Documents, Images and Data in Chat.
There are two workflows that involve chats and files. This article is about adding Files to a Conversation in the Chat interface. There is also the File Agent, which is separate but related - see this article:
Adding Files to Conversations in Chat
Agents generally already have some data to start with, but you can augment this in a variety of ways. One of the easiest ways is to click the paperclip icon in the main chat interface to upload a file. This adds the file to the conversation you’re in. Sapience handles different file types differently, divided into documents, images and data files
Documents
Sapience has built-in support for more than 1000 file types. When you upload a document to a conversation, the Agent will add that document to its context (in addition to whatever is built-in to the Agent itself). Have a large document you’re struggling with? Add it to a conversation and ask Sapience about it! You can also upload it to Sapience Files and launch the dedicated chat-with-file agent.
Images
Sapience supports AI Vision accross many models. Anthropic, Google and Open AI all have models that support computer vision, and when you’re working with an Agent that supports it, adding an image to a chat, or pasting one in from the clipboard to the chat will auto-magically launch AI vision.
- Below is a screenshot of what happens if you paste an image into the chat input box, or if you attach an image file:

- Now I can ask the AI to tell me about the image.
- Pro tip: This works great with drawings, notes, brainstorms on a whiteboard. Try it out!
Data Files (Excel, CSV, etc)
When you upload a data file, or tabular data, which usually means .xls, .xlsx, .csv or .json, Sapience will detect this and prompt you to determine if you want to use the Sapience Coding Agent, or if you want to deal with it like a regular document.
In the screenshot below you can see that the user has added an Excel file, and Sapience then prompts asking how you want to treat the file. The coding agent spins up a container and can perform sophisticated analysis or image generation. Ask it to generate static charts or interactive dashboards and it will. Just be sure to be specific in what you want it to generate.
