Working on a file with the Assistant, end to end
Attach a file by button, drop or paste. It is validated before anything parses it, read with the standard library for its format, and answered from. If you ask for a change, the Assistant proposes one and writes it as a new version — the original is never overwritten — and the file stays linked to whatever record the tab was working on.
The path a file takes#
- Trigger — you attach a file to an Assistant tab by button, drag-and-drop or paste.
- User event — the browser hands the bytes to the app; nothing is parsed in the page.
- Authentication and workspace resolution — the upload enters your workspace before storage, so the file is scoped from the first moment it exists.
- Ingest — one file service serves both audiences:
file_workspaceover themedia_assetstable, already scoped and under row-level security, so no new table was needed for files. - Canonical record — the file becomes a row with its type, size, origin and version; a change later becomes another version of the same file, not a second file.
- Classification and extraction — the declared type is validated, then the format's reader runs: a PDF text layer, a DOCX body, an XLSX sheet, or the model reading an image.
- Knowledge, memory and rules — the extracted text is what the model is given, within the same grounding budget any other answer uses.
- Autonomy and approval — reading needs none. A modification is a proposal you confirm, like any other write.
- Action through the owning service —
read_fileandask_fileread;create_fileandmodify_filewrite, andmodify_filealways produces a new version. - Result — an answer about the file, or a new version with provenance recorded against it.
- Relationship and timeline — the file is linked to the record the tab was on, so it is findable from the person or company rather than only from the conversation.
- Audit and usage — who uploaded it, who changed it and which version came from which is kept; the model call is metered.
What you can ask about a file#
| You ask | The tool | What comes back |
|---|---|---|
| What does this say | ask_file | An answer drawn from the extracted text, citing the file |
| Give me the third column | read_file or data_query | The values as read, with the sheet and range named |
| Compare this with the last one | list_files then ask_file twice | A comparison naming both versions explicitly |
| What is in this photo | The model reads the image | A description; images have no text layer to extract |
| Add it to the customer | The relationship service | The file linked to that person or company |
The distinction that saves time is between asking about a file and asking for its contents. Asking about it costs one read and returns an answer. Asking for all of it returns as much as the grounding budget allows, which for a long document is a fraction — so a question is nearly always the better instrument than a request to dump the text.
Changing a file is always a new version#
Ask for the change in words: correct the date in the second paragraph, add a total row.
Result A proposal names the file, the change and the version it would create. Nothing has been written.
Confirm it.
Result
modify_filewrites a new version through the file service. The previous version stays exactly as it was, with its own provenance.Check the version list on the file.
Result You see both versions, who produced each and whether it came from a person or from the Assistant.
There is no in-place edit and no overwrite. That is what makes a mistaken modification cheap: the old version is still the old version, and reverting means pointing at it rather than reconstructing it. File versions covers the chain itself.
Where it fails, and what is left behind#
- Refused before parsing
- The type check rejected it. Nothing was extracted and nothing was stored to be cleaned up later — see the file was refused.
- Accepted with no text
- A scanned PDF has no text layer. The model reads the pages as images instead, which answers questions but does not give you selectable text.
- An answer that ignores half the document
- The grounding budget was reached. Ask a narrower question rather than a broader one.
- Linked to the wrong record
- The tab was on a different record than you thought. The link can be changed; the file is not duplicated by relinking.
Questions#
Does attaching a file to the Assistant put it in the workspace permanently?
Yes. It becomes a file row in the shared file workspace, scoped to your workspace and under row-level security, and it is reachable from the Files section and from whatever record it was linked to — not only from the conversation.
Can the Assistant create a file from scratch?
Yes, through create_file, and the result is a first version with provenance saying it came from the Assistant and who asked for it. Creating a document is that flow end to end.
What happens to the original when a change is made?
Nothing. Every change is a new version. The original keeps its bytes, its version number and its provenance, and stays retrievable after any number of later versions.