Newer Version Available
AiAuthoringBundle
AiAuthoringBundle packages and manages AI authoring artifacts with version control features. This metadata type provides a structured way to organize, version, and target AI-related content within your Salesforce org.
Directory Structure
AiAuthoringBundle agents are stored in an aiAuthoringBundles folder with a specific structure. Here’s an example of the structure.
1+--aiAuthoringBundles
2 +--my_service_agent (1)
3 +--my_service_agent.agent (2)
4 +--my_service_agent.bundle-meta.xml (3)
5 +--my_employee_agent (1)
6 +--my_employee_agent.agent (2)
7 +--my_employee_agent.bundle-meta.xml (3)The bundle includes the following resources:
- A folder (1) for each agent. If the folder suffix contains an underscore followed by a number (for example, my_service_agent_5), that number indicates the agent version. If there isn't a number in the suffix, the agent definition applies to the latest version of the agent.
- Each agent folder contains a file that defines the agent (2). For example, this file can be an Agent Script definition. See Agent Script in the Agentforce Developer Guide for details.
- Each agent folder contains the metadata associated with the agent (3). Be sure to review the description for the target field to understand how to distinguish committed agent versions from uncommitted versions.
Version
AiAuthoringBundle is available in API version 65.0 and later.
Fields
| Field Name | Description |
|---|---|
| bundleType |
|
| target |
|
| versionDescription |
|
| versionTag |
|
Declarative Metadata Sample Definition
The following package.xml file is an example of an AiAuthoringBundle component.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>New_Agent</members>
5 <name>AiAuthoringBundle</name>
6 </types>
7 <version>65.0</version>
8</Package>In the .zip file for this bundle, each agent is nested in the aiAuthoringBundles folder. This example shows the directory structure in the .zip file for an agent named New_Agent. Each agent bundle folder must contain an agent file and a metadata file.
1+--aiAuthoringBundles
2 +--New_Agent
3 +--New_Agent.agent
4 +--New_Agent.bundle-meta.xmlTo see an example of an Agent Script agent file, see Agent Script in the Agentforce Developer Guide.
This example shows the metadata XML for the agent in the file New_Agent.bundle-meta.xml. The example commits the agent version because it contains a target value. Uncommitted versions don't contain this field.
1<?xml version="1.0" encoding="UTF-8"?>
2<AiAuthoringBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3 <bundleType>AGENT</bundleType>
4 <target>Agentforce_Service_Agent.v2</target>
5 <versionTag>DF 2026.3</versionTag>
6</AiAuthoringBundle>Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.