- Getting started
- UiPath Agents in Studio Web
- About UiPath Agents
- Licensing
- Running agents
- Working with files
- Contexts
- Escalations
- Evaluations
- Agent traces
- Agent score
- Managing UiPath agents
- UiPath Coded agents
Agents user guide
The Analyze Files tool allows agents to process and reason over file content using LLMs.
Add the Analyze Files tool
To add the Analyze Files tool to your agent, take the following steps:
-
Define file inputs. In the Data Manager panel, add an argument for each file input in your agent schema.
Figure 1. Creating file input arguments
Input argument must be explicitly referenced in the user prompt using the
{{exampleInput}}syntax. Input arguments that are not referenced are ignored and may affect the agent’s score.- For a single file, set the argument type to File and reference it in the user prompt. For example: "Analyze the following report and summarize the key findings:
{{reportFile}}". - To pass multiple files, set the argument type to Array and the item type to File, then reference the argument by name in the user prompt. You can also add optional string arguments for runtime instructions. For example:
Analyze the following report files and summarize the key findings. ## Inputs - Report files: {{reportFiles}} - Additional instructions (optional): {{analysisInstructions}}Analyze the following report files and summarize the key findings. ## Inputs - Report files: {{reportFiles}} - Additional instructions (optional): {{analysisInstructions}}In this example,
reportFilesis an Array of File argument andanalysisInstructionsis an optional String argument. Both must be defined in the Data Manager panel. - For a single file, set the argument type to File and reference it in the user prompt. For example: "Analyze the following report and summarize the key findings:
-
Add the Analyze Files tool to your agent definition:
- Select Add tool in the Tools panel.
- From the Built-in tools category, choose Analyze Files.
- Update the tool name and description to help the agent reason better about when to use it. The name and description guide the agent's planning phase — they determine when the agent decides to call the tool, not what the tool does with the files at runtime.
-
Set the tool’s inputs. The tool comes preconfigured with two main inputs:
attachments(array): A prompt-defined input that tells the agent which files to pass to the tool. In this field, describe how the agent should use the file inputs referenced in the user prompt (for example,{{reportFiles}}). The agent automatically maps those referenced files to this input at runtime. Example: "Use the files provided in the user prompt (for example, {{reportFiles}}) as inputs for analysis."analysisTask(string): A runtime instruction telling the LLM what to do with the files once the tool is invoked — for example, "Analyze these reports. Extract the report title, an executive summary, key findings ordered by importance, actionable recommendations, and the overall sentiment." This is distinct from the tool name and description, which control when the agent calls the tool. If your use case involves only one file, you can describe attachments accordingly (for example, "Use the file provided in{{reportFile}}…").
-
Run the agent with input files.
- Open the Debug configuration window:
- Navigate to the Project arguments tab.
- Upload your input files bound to your
reportFilesargument.
- Select Save and run the debug session.
- Open the Debug configuration window:
-
After running the agent, inspect the execution trace via the bottom panel.
The Analyze Files tool is now added to your agent and configured to process file inputs. The execution trace in the Execution Trail panel shows how each attachment was handled during the run.
File attachment traces
When using the Analyze Files tool, all file inputs and outputs are captured in the Execution Trail panel, in the History tab. The trace provides detailed visibility into how attachments were handled during agent execution.
For each file, the trace shows:
-
ID: A unique identifier for the attachment.
-
Name: Original file name (for example,
1.jpg). -
MIME type: Detected file type (for example,
image/jpeg).Figure 2. The file analysis in the execution trail
Select the tool call from the execution trace and navigate to the Files tab to download the file.
Figure 3. How to download a file from traces
Best practices and FAQ
Refer to Working with files for more details on using files from Maestro processes, RPA workflows, or standalone agent runs.
The Analyze Files tool enables agents to process documents and images using LLMs. While powerful, there are some important limitations and behaviors to be aware of when designing file-driven agents.
File limits
Each file must not exceed 30 MB. There is no enforced limit on the number of files per request.
File type support by provider
File support depends on the LLM provider and model selected for the agent. Although multiple providers support formats such as PDF, Word documents, spreadsheets, HTML, text, Markdown, and images, each provider may process these files differently before sending the content to the model. Results may vary between providers and models, especially for files that contain charts, embedded images, complex layouts, formulas, or large tables.
The table below shows the formats supported by the latest models exposed by UiPath:
| Provider / model family | Supported document and text formats | Supported image formats |
|---|---|---|
| Anthropic models through AWS Bedrock | .pdf, .csv, .doc, .docx, .xls, .xlsx, .html, .txt, .md | .gif, .jpe, .jpeg, .pdf, .png, .tiff, .webp |
| OpenAI GPT models | .pdf, .csv, .doc, .docx, .xls, .xlsx, .html, .txt, .md | .gif, .jpe, .jpeg, .pdf, .png, .tiff, .webp |
| Gemini models through Vertex AI | .csv, .txt, .md, .html | .gif, .jpe, .jpeg, .pdf, .png, .tiff, .webp |
Support depends on the selected model and provider capabilities. Some models may support a file extension at the API level but process the file differently internally, which can affect the quality of the response.
File support for custom LLM configurations
When using the Bring Your Own LLM capability through AI Trust Layer, the file types supported by Analyze Files depend on the configured LLM setup. For details, refer to Configuring LLMs.
File support is determined by the combination of:
- The selected provider, such as Azure OpenAI, Amazon Web Services, or Google Vertex
- The selected model family and model version
- The configured API Type, such as the provider endpoint used to call the model
- The file processing capabilities exposed by that provider endpoint
A file type that works with one model or provider may not work with another, even when both models are available through AI Trust Layer. For example, support for documents, spreadsheets, images, and PDFs can vary depending on whether the provider API accepts those files directly, extracts text from them, converts them into images, or applies a provider-specific preprocessing step.
UiPath validates that the configured LLM endpoint is reachable and compatible with the selected product configuration. When using a custom LLM configuration, you are responsible for ensuring that the configured model, provider, and API Type support the file types required by your Analyze Files use case.
File compatibility may change when switching from a UiPath-managed model to a custom LLM configuration, or when changing the provider, model version, or API Type. If Analyze Files fails to process a file after changing the LLM configuration, review the configured provider, model, and API Type in AI Trust Layer.
How file processing works
When a file is passed to an LLM, the model does not receive the original file as-is. Most providers apply a preprocessing step before the content is added to the model context. The preprocessing behavior depends on the file type.
For OpenAI file inputs:
- PDF files can be processed as both extracted text and page images on vision-capable models.
- Non-PDF document and text files are processed as extracted text only.
- Spreadsheet files use a spreadsheet-specific augmentation flow. OpenAI parses up to the first 1,000 rows per sheet and adds summary and header metadata so the model can work from a structured representation of the data.
Other providers such as AWS Bedrock and Vertex AI may use similar preprocessing approaches, but the exact implementation details are provider-specific and may not be fully documented.
Large files may exceed token limits
Agents process files by embedding their contents into LLM prompts, which are constrained by the model’s token limit. Large PDFs or scanned image documents may silently fail or return vague errors like "An error occurred", especially when they exceed the model’s token budget.
To mitigate:
- Use models with higher token capacity.
- Use retrieval-oriented capabilities such as File Search or Context Grounding, especially for large or multi-page files.
- Pre-index documents and sync them before or during the agent run via custom tools.
Handling large PDFs
Large PDFs can exceed the LLM’s token budget when processed in full. Split the PDF into smaller chunks or individual pages before passing them to the agent.
LLMs resize images
When image files (for example, .jpg, .png) are sent as part of the LLM prompt, most models automatically resize them. This can distort aspect ratios or lose pixel-precise data.
Avoid prompts that rely on exact coordinates, bounding boxes, or pixel-aligned comparisons (for example, image diffs requiring specific x/y positioning). For more information, refer to OpenAI’s image vision guide for model-specific resizing behavior.
Tips for better results
- File names must be clean: Anthropic models, in particular, reject file names with special characters or repeated whitespace.
- Keep image count low: Some models like GPT-4o support a maximum of 10–50 images per request.
- Use PDF format when layout, charts, or diagrams are important. Embedded images and charts in non-PDF formats such as .docx may not be extracted into the model context.
- Use text-based formats such as .txt, .md, or .html for straightforward document understanding tasks.
- For complex spreadsheet analysis involving aggregations, joins, formulas, or charting, use a deterministic processing step or a dedicated data-processing workflow before passing the result to the agent.