# AI Agents - Sending Files

## Getting link inside the File Manager

To get the link of a file in the [File Manager](https://docs.sprinthub.com/en/topics/general/file-manager) (whether a new one or already among the instance's uploads), just right-click on it and select **"View File"**. The link will open in a new tab and, with it, it will be possible to train the AI Agent to send the file.

<div align="center" data-full-width="false"><figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FHlQPHrmhxduTlyXGeQnR%2F1.png?alt=media&#x26;token=762af360-f47b-4e1f-9db8-5e016658024c" alt=""><figcaption><p><em>File Manager.</em></p></figcaption></figure></div>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fbwm3SCPJDSq4777O6TOa%2F2.png?alt=media&#x26;token=5094fd7c-a61a-415a-9496-0d7ac42e64e2" alt=""><figcaption><p><em>File link.</em></p></figcaption></figure>

## Configuring the training

For the file to be sent to the lead, you need to define a condition linked to the link.\
For example: when the lead requests the **Best Practices Guide**, the system will automatically send the corresponding file (for example, a `.docx`).

This configuration can be done in the **Custom Background** or in **Additional Rules**, within the Contextualization tab, or also in **Questions and Answers** of the skill [Database](https://docs.sprinthub.com/en/topics/artificial-intelligence/ai-agents/ai-agents-database).

In the example below, you can see the configuration in the **Custom Background** and then the test where the file is sent during the conversation.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FKCZB253fOPFg3An3THeN%2F3.png?alt=media&#x26;token=ff583d45-c168-476d-8c28-317775646434" alt=""><figcaption><p><em>Contextualization tab.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F9dwpNcmanmVnGsPnlqHO%2F4.png?alt=media&#x26;token=c01167ef-dbca-4af8-a693-ee70bc6696fc" alt=""><figcaption><p><em>Customer service interaction.</em></p></figcaption></figure>
