Introduction
An Agentforce agent is an AI-powered assistant built on Salesforce’s Agentforce platform that can help users by handling questions and tasks without needing constant guidance. It is designed to help teams work faster and more efficiently by combining generative AI with Salesforce data, automation, and decision-making capabilities.
This guide will explain how to successfully deploy Agentforce Agents via Gearset pipelines.
Prerequisites
In all the Salesforce orgs, Agentforce / Einstein Generative AI must be enabled through Setup.
Your Metadata API version must be 60.0 or higher because the Agentforce (GenAI) metadata types (like GenAiPlanner, GenAiFunction, GenAiPlugin, etc.) were introduced starting in API version 60.
Please, ensure that you have the necessary permission set licenses to retrieve Agentforce metadata types.
The required licenses include:
Agentforce (Default)
Agentforce Service Agent Builder
Einstein Prompt Templates
Prompt Template Manager
What metadata is needed in the CI job filter?
To move an Agentforce agent from one org to another, you generally need to deploy the metadata that covers the core agent definition and its version, the planning or reasoning configuration, and the associated topics, actions, and prompt templates that power the agent’s functionality.
You would need to include all the Agentforce metadata types in the CI job filter.
How to deploy an Agent through pipeline
Navigate to the Deployment pipelines page and click on your Dev Sandbox org. Then select the New feature button.
Run a comparison with Default Agentforce comparison filter. In the comparison results, find the Agent(s) that you have created, select the items for deployment. Click Next and go through the compare and deploy steps.
Once the changes are committed to the feature branch, click on Create pull request button.
Activate the Bots and Agents
Gearset allows you to automatically activate the Bots and Agents as a post-deployment step in pipeline.
After you've selected Create pull request button on your Dev Sandbox, a pop up window will appear where you can see Deployment steps tab.
Under Post-deployment steps, click + Add step button and then Einstein Bot activation.
Select the environments to run against and click Add step.
Once you have added the post deployment step, click Create pull request and a new PR will be opened against the next environment in pipeline. You will see Einstein Bot activation under Post-Deployment Steps.
If the validation is successful, click Promote changes which will deploy the changes to your environment and the Bot and Agent will be automatically activated in your org.
Once the changes have been promoted, a new pull request will be opened against the next environment. Repeat the process until the changes reach your production org.
The post deployment step will automatically appear in the next environments if you have selected the step to run against all environments.
If you have selected the post deployment step to run against a specific environment, you can manually add the step in the other environments by clicking + Add step in the pull request and select Einstein Bot activation.
Check out these related documents on deploying Agentforce metadata types:










