Skip to content

File Operations

Agents can read files from the virtual filesystem and produce files for users to download.

Reads a file from the virtual filesystem. Files are addressed using virtual paths that specify whether they belong to a user or an agent.

read_file(path: "user://uid/report.pdf")
read_file(path: "agent://dev/output.csv")
ParameterTypeRequiredDescription
pathstringyesVirtual file path (e.g., user://uid/report.pdf or agent://dev/output.csv)
offsetintegernoLine offset to start reading from (text files only, default: 0)
limitintegernoMaximum number of lines to read (text files only, default: 500)

For text files, offset and limit let the agent read large files in chunks without loading everything at once.

Registers a file the agent has created so the user can download it. The file must already exist in the agent’s workspace.

produce_file(path: "output.csv")
produce_file(path: "subdir/report.pdf")
ParameterTypeRequiredDescription
pathstringyesPath relative to the workspace (e.g., output.csv or subdir/report.pdf)

The produced file appears as a downloadable attachment in the chat message.

Users can upload files through the chat interface. Uploaded files are stored in the file storage path (FRONA_STORAGE_FILES_PATH, default: data/files) and appear as message attachments.

Agents can see and reference uploaded files in the conversation.

PathConfig variableDefaultPurpose
WorkspacesFRONA_STORAGE_WORKSPACES_PATHdata/workspacesPersistent agent file storage
FilesFRONA_STORAGE_FILES_PATHdata/filesFile uploads and attachments