> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/agentic-commerce-intelligence/agentic-intelligence/configuration/tools/file-generator-tool.md).

# Built-in File Generator Tool

Let agents provide images and downloadable files in the chat with the built-in file generator tool.

The Built-in File Generator Tool lets an agent provide users with images and downloadable files next to its text answer, for example a product visual or a PDF summary of an order. Unlike other native tools, it is built into Emporix, so you do not create or configure it in **AI Tools**. It appears only in the agent's **Tools** tab, so you attach it when you create or edit an agent in **AI Agents**.

{% hint style="danger" %}
Image and file generation is currently in preview mode and is enabled upon request. To enable it for your tenant, contact the [Emporix Support Team](mailto:support@emporix.com). Some of the features may not be fully operational yet.
{% endhint %}

## Generated files and images

With the tool attached, the agent can provide the following results:

* Text, Markdown, source code, CSV, JSON, YAML, XML, and PDF files
* Images, if the model that powers the agent supports image generation

The images and files are stored as private media assets in your tenant. They appear next to the agent's answer in [AI Assistants](https://developer.emporix.io/agentic-commerce-intelligence/agentic-intelligence/ai-assistants.md) and in other chats that use the [streaming chat API](https://developer.emporix.io/api-references/api-guides/artificial-intelligence/ai-service/api-reference/agent-chat#post-ai-service-tenant-agentic-chat-stream). The chat shows images inline, shows progress while an image is being generated, and offers each file for download. If an image or file cannot be created, the text answer stays available.

## Attaching the tool to an agent

{% stepper %}
{% step %}

#### Open the agent

In **Agentic AI** -> **AI Agents**, create a new agent or open an existing one.
{% endstep %}

{% step %}

#### Select the tool

In the **Tools** tab, under **Native Tools**, select **Built-in file generator**. The tool needs no further setup. Choose **Save**. From now on, the agent can provide images and files when the request calls for them.

<figure><img src="https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-240484f7cb78c16d26d6e8c9bf8744c2b548fb39%2Fagentic_file_generator_tool.png?alt=media" alt="Built-in file generator selected under Native Tools"><figcaption><p>Selecting the Built-in file generator under Native Tools</p></figcaption></figure>
{% endstep %}
{% endstepper %}

To make the agent more likely to produce a file or an image, mention it in the agent's **User Prompt**, for example:

> Prepare a PDF summary of the order and share it in the chat.

## Required permissions

The images and files are private media assets, so the user who chats with the agent needs the following permissions:

| Action                                | Required scope       |
| ------------------------------------- | -------------------- |
| Let the agent create images and files | `media.asset_manage` |
| View or download the images and files | `media.asset_read`   |

Without permission to manage media assets, the agent answers in text only.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.emporix.io/agentic-commerce-intelligence/agentic-intelligence/configuration/tools/file-generator-tool.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
