Skip to content

Agents can read files you upload, create new files for you to download, and work with files stored in their workspace. This is how you share documents with agents and get deliverables back.

Uploading files

Drag and drop a file into the chat, or use the attachment button. The agent can immediately read and work with it.

Common workflows:

  • "Here's a CSV. Analyze it and give me a summary"
  • "Read this PDF and extract the key points"
  • "Take this JSON file and convert it to CSV"

Getting files from agents

When an agent creates a file (a report, a script, processed data), it appears as a downloadable attachment in the chat.

Ask for files explicitly:

  • "Write a Python script and save it as a file I can download"
  • "Create a CSV report from this data"
  • "Generate a summary and save it as a markdown file"

How agents access files

Agents read files using code execution tools (shell, Python, Node.js). To share a file with you, agents use the produce_file tool, which makes the file available as a downloadable attachment in the chat.

Files live in the agent's workspace directory and persist across conversations. A file uploaded in one chat session is available in future sessions.

Tips

  • Name your files clearly. Agents use filenames to understand what a file contains. "q2-sales-data.csv" is better than "data.csv."
  • Use files for large content. Instead of pasting a huge block of text into chat, upload it as a file. Agents handle files more reliably than very long messages.
  • Files persist. Files in the workspace survive across conversations. You can reference them later: "Use the report from last time."
  • Ask for specific formats. "Save it as CSV" or "Create a PDF" when you need a particular output format.

Next steps