# Deploying agents from sandbox to production

*Agentforce Specialist Study Guide · Testing, Deployment, and Maintenance · Last updated October 15, 2026 · https://www.certifyforce.com/study-guide/agentforce-specialist/testing-deployment-and-maintenance/deploying-agents-from-sandbox-to-production*

Moving a tested agent to production with a change set or with Salesforce CLI and source control: which metadata types carry the agent, why every dependency must travel with it, and the post-deployment steps (agent user, permissions, activation) on a go-live checklist.

- Certification: Salesforce Agentforce Specialist
- Exam section: Testing, Deployment, and Maintenance
- Study guide: https://www.certifyforce.com/study-guide/agentforce-specialist

**Official exam objective:**

> Identify the considerations for deploying an agent from sandbox to production.

## What the exam expects

- Choose between a change set and Salesforce CLI with source control for moving an agent.
- Name the metadata components that carry an agent and add every dependency (flows, Apex, objects, permission sets) to the deployment.
- Complete the move: inbound change set validation and deployment, or CLI retrieve and deploy.
- Plan post-deployment steps: agent user, permissions and activation.
- Build a go-live checklist that keeps testing in the sandbox.
- Key terms: **change set** (Setup tool that sends metadata from one connected org to another); **Salesforce CLI** (command-line tool that retrieves and deploys metadata between orgs and a local project); **GenAiPlugin / GenAiFunction** (metadata for an agent's subagents, formerly topics, and its actions); **agent user** (the user record a Service agent runs as); **interdependent components** (everything an action needs to run in the target org).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Change set agent components | GenAI Function Definition, GenAI Plugin Definition, Bot | [Agentforce Deployment with Change Set](https://help.salesforce.com/s/articleView?id=005232697&language=en_US&type=1) |
| Dependencies | Add flows, Apex classes, custom objects and permission sets the actions use | [Agentforce Deployment with Change Set](https://help.salesforce.com/s/articleView?id=005232697&language=en_US&type=1) |
| Completing a change set | Open the inbound change set in the target, then validate and deploy | [Agentforce Deployment with Change Set](https://help.salesforce.com/s/articleView?id=005232697&language=en_US&type=1) |
| Committed agent metadata (v67 and earlier) | AiAuthoringBundle, Bot and BotVersion; not editable | [Define Agent Metadata (v67 and Earlier)](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx-api-v67-earlier.html) |
| v68 agent metadata | AiAgentDefinition and AiAgentDefinitionVersion; Bot only for Einstein Bots | [Agentforce Metadata Types (v68 and Later)](https://developer.salesforce.com/docs/ai/agentforce/references/agents-metadata-tooling/agents-metadata.html) |
| CLI path | Retrieve from sandbox to a DX project, deploy to production | [Move an Agent to a New Org](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx-deploy-metadata.html) |
| After CLI deploy | Assign the agent user; keep source and target agent versions matching | [Move an Agent to a New Org](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx-deploy-metadata.html) |
| Activation | One active version per agent; needs Manage AI Agents plus agent-type permissions | [Activate or Deactivate Your Agent](https://help.salesforce.com/s/articleView?id=ai.copilot_setup_activate_deactivate.htm&language=en_US&type=5) |

## Check yourself

- Which three component types carry an agent in a change set?
- Why might an agent arrive in production with no subagents or actions?
- When should a team use Salesforce CLI instead of change sets?
- What must you do before a CLI-deployed agent can run in the target org?
- Why must testing stay in the sandbox on a go-live checklist?

## Sources

- [Agentforce Deployment with Change Set](https://help.salesforce.com/s/articleView?id=005232697&language=en_US&type=1)
- [Move an Agent to a New Org](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx-deploy-metadata.html)
- [Define Agent Metadata (v67 and Earlier)](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx-api-v67-earlier.html)
- [Agentforce Metadata Types (v68 and Later)](https://developer.salesforce.com/docs/ai/agentforce/references/agents-metadata-tooling/agents-metadata.html)
- [Agentforce DX](https://developer.salesforce.com/docs/ai/agentforce/guide/agent-dx.html)
- [Configure Service Agent Access](https://help.salesforce.com/s/articleView?id=ai.agent_user.htm&language=en_US&type=5)
- [Activate or Deactivate Your Agent](https://help.salesforce.com/s/articleView?id=ai.copilot_setup_activate_deactivate.htm&language=en_US&type=5)
- [Versioning and Editing Agents](https://help.salesforce.com/s/articleView?id=ai.agent_versions_lifecycle.htm&language=en_US&type=5)
- [Agentforce Testing Center](https://help.salesforce.com/s/articleView?language=en_US&id=ai.agent_testing_center.htm&type=5)
- [Understanding Trust in Agentforce Testing Methods](https://trailhead.salesforce.com/content/learn/modules/agentforce-agent-testing/trust-your-agents)
- [Lifecycle Center (formerly DevOps Center)](https://help.salesforce.com/s/articleView?id=platform.devops_center_overview.htm&language=en_US&type=5)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 6 linked practice questions, and unlimited timed mock exams are included with the Agentforce Specialist pack (USD $19): https://www.certifyforce.com/practice-exams
