> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Pass Files Uploaded by Users to External Services or LLMs

When users upload documents to an Agentic App, the Platform stores the files and makes their metadata available in session memory. Tools can then access this metadata to pass file URLs and content to external systems or LLMs for further processing.

```
User uploads file → Platform stores file + metadata → Tool accesses metadata → Passes to external system
```

***

## How It Works

1. **Users upload documents** via the Agentic App Playground or programmatically using APIs.

2. **The Platform processes uploaded files** in two ways:
   * **Content Extraction** — For [supported file types](/agent-platform/memory#file-attachments), the Platform extracts content and uses it as context.
   * **Metadata Storage** — For [all supported file types](/agent-platform/memory#file-attachments), the Platform captures and stores the following metadata in `sessionMeta.artifacts`:

     | Field         | Description                                                                                                                                                       |
     | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
     | `fileId`      | Unique identifier for the uploaded file                                                                                                                           |
     | `type`        | Type of data                                                                                                                                                      |
     | `filename`    | Original filename as uploaded by the user                                                                                                                         |
     | `mimetype`    | MIME type of the uploaded file                                                                                                                                    |
     | `isActive`    | Whether the document applies to the current conversation. [Learn more](/agent-platform/agents/agentic-apps/settings/app-configurations#attachment-configuration). |
     | `downloadUrl` | Temporary direct access URL, **valid for 30 days** from date of upload                                                                                            |

3. **Metadata is accessible** in agent and supervisor prompts or code tools, and can be passed to third-party services for further processing. [Learn more](/agent-platform/agents/agentic-apps/attachment-support#file-metadata).

***

## Accessing Uploaded File Metadata

Access all uploaded file artifacts from session memory:

```
{{memory.sessionMeta.artifacts}}
```

To access the `downloadUrl` of the first uploaded file:

```
{{memory.sessionMeta.artifacts[0].downloadUrl}}
```

Download the file directly using the `downloadUrl`, or pass the URL to a third-party service for further processing.

***

## Example: Insurance Claim Document

A user uploads supporting documents for an insurance claim. The insurer requires the document for verification and future reference.

1. User uploads the supporting documents for the insurance claim.
2. The Platform stores the file and captures its metadata, including the `downloadUrl`, in session memory.
3. A tool shares the file metadata and `downloadUrl` with the insurance system.
4. The insurance system downloads and processes or stores the file.
5. The agent confirms to the user that the document was successfully shared with the insurer.

***
