Font Size:

File Prompt

Introduction

The File element allows you to provide files, such as PDFs, images, or text documents, as part of your AI agent's prompt. You can upload files, specify their sources, and use the content to generate intelligent responses such as summaries, analyses, or responses based on file data.

This element is useful when you want the AI to read a file and generate a message or response based on its content.

Get started

How to use it

To use the File Element, add the File prompt:

  1. Locate the File element under the Prompts section of the palette.
  2. Drag and drop the element into the Drop a prompt to here section.

Configure Form Properties

To properly integrate and configure the File, set the following fields:

  • Message Role: Defines how the content of the file will be treated by the AI agent.
    • User: The file content is treated as if it were uploaded or written by the end user. Use this when the file represents a user question, a complaint, a document to summarize, etc.
    • Example: A customer uploads a PDF complaint — the AI should respond as if the user wrote it.
  • System: The file content is treated as system-level instructions or background information that should guide how the AI responds. Use this when the file contains context, rules, or examples.
    • Example: A PDF with internal company policies that the AI should follow when answering.
  • Purpose: A clear explanation of what you want the AI to do with the file. This helps the AI understand its intent.
  • File Type: Specify the type of file being used:
    • Image 
    • PDF
    • Text Content
  • File Source: Specify where the file will be retrieved from:
    • App Resources: Upload the file to App Resources in the builder. Then select the uploaded file.
    • Form Upload File: Use this when the file comes from a form submission.
      • Form: Name of the form containing the file upload field.
      • Field ID: The field ID where the file is uploaded.
      • Record Id: The specific record ID for the submission.
    • System Path: The direct file path from your server or system where the file is stored.
    • URL: The URL of the file you want to include (e.g., a public PDF link or an image on the web).
Created by Gabriel Last modified by Gabriel on Jun 24, 2025