> 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-sending-files.md).

# AI Agents - Sending Files

Customizing the AI Agent to reply with files.

## Obtaining a link within the File Manager

To obtain the link to a file in the [File Manager](/en/topics/general/file-manager.md) (whether it is a new one or one already existing among the instance uploads), simply 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&amp;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&amp;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, it is necessary to define a condition linked to the link.\
For example: when the lead asks for the **Best Practices Guide**, the system will automatically send the corresponding file (for example, a `.docx`).

This configuration can be done in the **Customized Background** or in **Additional Rules**, within the Contextualization tab, or even in **Questions and Answers** of the skill [Database](/en/topics/artificial-intelligence/ai-agents/ai-agents-database.md).

In the example below, it is possible to see the configuration in the **Customized 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&amp;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&amp;token=c01167ef-dbca-4af8-a693-ee70bc6696fc" alt=""><figcaption><p><em>Customer service with the client.</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-sending-files.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.
