---
schema_version: "1"
id: 861e805cd5480120dea32a500006ae6c2f1db53397cd00a15ea5ef739faf5eb3
title: agent adl file add
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfclireference/guides/agent/cli_reference_agent_adl_file_add.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_agent_adl_file_add.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: da464286cb811119b7cc3bbef78b62239a5ac82d1e02be5aefc9a3a49d0f0587
products:
  - Salesforce CLI Command Reference
  - salesforcedx
---
<!-- prettier-ignore-start -->

# agent adl file add

Add files to an existing Agentforce Data Library.

## Description for agent adl file add

Adds one or more files to an existing SFDRIVE data library and triggers SearchIndex re-hydration. This is the day-2 operation for adding files to an already-provisioned library.

Adds files to an existing READY library. Unlike `sf agent adl upload`, this does NOT create new downstream Data Cloud assets — it appends files to the existing SearchIndex and triggers re-indexing.

Constraints: at least 1 file required, no duplicate file names in a batch, maximum 1000 files per library.

## Flags

| Flag Name (Long) | Flag Name (Short) | Description |
|------------------|-------------------|-------------|
| <code>&#8209;&#8209;api&#8209;version</code> | N/A | **Type:** Value<br><br>Override the api version used for api requests made by this command |
| <code>&#8209;&#8209;flags&#8209;dir</code> | N/A | **Type:** Value<br><br>Import flag values from a directory. |
| <code>&#8209;&#8209;json</code> | N/A | **Type:** Boolean<br><br>Format output as json. |
| <code>&#8209;&#8209;library&#8209;id</code> | <code>&#8209;i</code> | **Type:** Value<br>**Required**<br><br>Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD). |
| <code>&#8209;&#8209;path</code> | <code>&#8209;f</code> | **Type:** Value<br>**Required**<br><br>Path to file(s) to add. Specify multiple times for batch upload. |
| <code>&#8209;&#8209;target&#8209;org</code> | <code>&#8209;o</code> | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |

## Examples for agent adl file add

Add a file to an existing library:

```shell
sf agent adl file add -i 1JDSG000007IbWX4A0 --path ./docs/new-guide.pdf --target-org myOrg
```

Add multiple files:

```shell
sf agent adl file add -i 1JDSG000007IbWX4A0 --path ./docs/guide.pdf --path ./docs/faq.txt --target-org myOrg
```
<!-- prettier-ignore-end -->
