# agent adl update

Update an Agentforce Data Library.

## Description for agent adl update

Updates the label, description, or other mutable properties of an existing data library.

## Flags

| Flag Name (Long)                | Flag Name (Short) | Description                                                                                                                                         |
| ------------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-version`                 | N/A               | **Type:** Value<br><br>Override the api version used for api requests made by this command                                                          |
| `--content-fields`              | N/A               | **Type:** Value<br><br>Comma-separated list of content fields for KNOWLEDGE libraries (triggers re-indexing).                                       |
| `--data-category-rule`          | N/A               | **Type:** Boolean<br><br>Enable or disable data category filtering for KNOWLEDGE libraries. Use --no-data-category-rule to disable.                 |
| `--description`                 | N/A               | **Type:** Value<br><br>New description for the data library (max 255 characters).                                                                   |
| `--flags-dir`                   | N/A               | **Type:** Value<br><br>Import flag values from a directory.                                                                                         |
| `--json`                        | N/A               | **Type:** Boolean<br><br>Format output as json.                                                                                                     |
| `--library-id`                  | `-i`              | **Type:** Value<br>**Required**<br><br>Agentforce Data Library ID (18-char Salesforce ID with prefix 1JD).                                          |
| `--name`                        | `-n`              | **Type:** Value<br><br>New display name for the data library (max 80 characters).                                                                   |
| `--restrict-to-public-articles` | N/A               | **Type:** Boolean<br><br>Restrict to public Knowledge articles only (KNOWLEDGE libraries, triggers re-indexing).                                    |
| `--retriever-id`                | N/A               | **Type:** Value<br><br>Swap the retriever for a RETRIEVER library (must be an active Custom Retriever ID).                                          |
| `--target-org`                  | `-o`              | **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 update

Update the label of a data library:

```shell
sf agent adl update --library-id 1JDSG000007IbWX4A0 --name "New Name" --target-org myOrg
```

Update the description:

```shell
sf agent adl update --library-id 1JDSG000007IbWX4A0 --description "Updated description" --target-org myOrg
```

Update Knowledge library content fields (triggers re-indexing):

```shell
sf agent adl update --library-id 1JDSG000007IbWX4A0 --content-fields "Answer**c,Summary**c" --target-org myOrg
```

Restrict Knowledge library to public articles:

```shell
sf agent adl update --library-id 1JDSG000007IbWX4A0 --restrict-to-public-articles --target-org myOrg
```
