agent adl create

Create an Agentforce Data Library.

Creates a new data library in the target org. The –source-type flag determines the type of library: SFDRIVE (file upload), KNOWLEDGE (Salesforce Knowledge articles), or RETRIEVER (existing active Custom Retriever).

For SFDRIVE libraries, creation provisions the full Data Cloud pipeline (DLO → DMO → SearchIndex → Retriever). Upload files with sf agent adl upload after creation.

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑content‑fieldsN/AType: Value

Comma-separated list of content fields for KNOWLEDGE libraries (optional, mutable after creation).
‑‑data‑category‑idsN/AType: Value

Comma-separated list of data category selection IDs for KNOWLEDGE libraries. Mutually exclusive with –data-category-names (provide one or the other, not both).
‑‑data‑category‑namesN/AType: Value

Comma-separated list of data category names in qualified format (e.g., “Group_API_Name.Category”). Mutually exclusive with –data-category-ids (provide one or the other, not both).
‑‑descriptionN/AType: Value

Description of the data library (max 255 characters).
‑‑developer‑nameN/AType: Value
Required

API name for the data library (max 80 characters, alphanumeric and underscores only, must start with a letter).
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑index‑modeN/AType: Value
Valid Values: basic, enhanced

Index mode for SFDRIVE libraries: basic or enhanced.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑name‑nType: Value
Required

Display name for the data library (max 80 characters).
‑‑primary‑index‑field1N/AType: Value

Primary index field 1 for KNOWLEDGE libraries (required, immutable after creation).
‑‑primary‑index‑field2N/AType: Value

Primary index field 2 for KNOWLEDGE libraries (required, immutable after creation).
‑‑retriever‑idN/AType: Value

ID of an active Custom Retriever (required for RETRIEVER source type; retriever must be active).
‑‑source‑typeN/AType: Value
Required
Valid Values: sfdrive, knowledge, retriever

Type of grounding source: sfdrive (file upload), knowledge (Salesforce Knowledge articles), or retriever (existing active Custom Retriever).
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.
‑‑wait‑wType: Value

Wait N minutes for indexing to complete (KNOWLEDGE libraries). SFDRIVE libraries require upload before indexing; RETRIEVER libraries are ready immediately.

Create an SFDRIVE library:

Create a KNOWLEDGE library with index fields:

Create a RETRIEVER library: