> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/artificial-intelligence/ai-agents/ai-agents-file-analysis.md).

# AI Agents - File Analysis

Setting up file analysis

To use AI file analysis, you need to configure a Gemini API key on the instance and enable this feature. In the settings, you can choose the maximum file size and the file extensions that the AI will be able to read.

If the extensions are not specified, all possible options can be analyzed. The formats currently supported are: mp4 (video), mp3 (audio), pdf (document), png (image), \
jpeg (image),&#x20;csv (spreadsheet), txt (document), mpeg (audio), wav (audio), avi (video)&#x20;and mpg (video).

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FAJAUouR5CsEK8TH1xzJ0%2F1.png?alt=media&amp;token=108ad1bb-5adb-4ff6-9adf-24f0dba616df" alt=""><figcaption><p><em>Agent skills.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FftVMt5fi5eHO2zpwYprP%2F2.png?alt=media&amp;token=22ef7af4-ce79-44eb-8834-57c5a24c6142" alt=""><figcaption><p><em>File analysis limitations.</em></p></figcaption></figure>

## Testing the feature

In the example below, the lead was interacting with the AI Agent when they sent a PDF with information relevant to the conversation. The agent analyzed the document's content and responded based on both its training and the available database — in this case, the store's product inventory.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FS5iRKu0Qup1hIu3QaXPm%2F3.png?alt=media&amp;token=267808ff-ed63-43dd-aa80-f6bf6101d417" alt=""><figcaption><p><em>Conversation with the lead.</em></p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/artificial-intelligence/ai-agents/ai-agents-file-analysis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
