How do you deploy Agentforce agents across environments (sandbox to production)?
Suggested answer
Agentforce agent configurations are metadata and can be deployed via:
1. Change Sets: Include the Agent Definition metadata type along with all dependent metadata — Topics, Actions, referenced Flows, Prompt Templates, and Apex classes. Validate the change set before deploying to catch missing dependencies.
2. Unlocked Packages: The recommended approach for teams using source-driven development. Package the agent metadata and its dependencies together for version-controlled, repeatable deployment. Unlocked packages support scratch org development for Agentforce.
3. Salesforce CLI / sf deploy: Deploy metadata directly from a source repository using sf project deploy start. Requires retrieving the agent metadata from the source org first with sf project retrieve start.
4. Scratch Org Support: Agentforce is supported in scratch orgs, enabling full CI/CD pipelines where agents are built in scratch orgs, unit tested, and packaged for deployment. Key considerations: Prompt Template versions must be activated in each target org; ensure LLM provider connections and model settings are configured in the target org; test agent behaviour post-deployment as LLM responses can vary across environments.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.