---
schema_version: "1"
id: bf9ae8256deb6b217a9156b4970d464cf1c85c961bb1314ea2fe07aa9ba7f536
title: Set Up Agent Optimization
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/generative_ai_optimize_setup.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.generative_ai_optimize_setup.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 30711a3bf58da5d0d16f354ccbccf51431c033f63ed04d63fd6cdcb3b6d9f0c2
description: To use Agent Optimization, turn it on in Einstein Setup. Analyze agent sessions, identify knowledge gaps, and explore unresolved interactions based on Agentforce Session Tracing data.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Set Up Agent Optimization

To use Agent Optimization, turn it on in Einstein Setup. Analyze agent sessions, identify knowledge gaps, and explore unresolved interactions based on Agentforce Session Tracing data.

### Required Editions

| Required Editions |
| --- |
| Agent Optimization is available in Salesforce Enterprise, Performance, and Unlimited Editions with Salesforce Foundations or Agentforce 1 Edition. |

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)

Note Agent Optimization is available in sandbox, DC1, and Civilian Government Cloud organizations.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission" summary="User Permissions"><colgroup><col> <col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Access and view Agent Optimization</td><td class="slds-cell-wrap" style="vertical-align:top;">Assign Access Agent Optimization and Data Cloud User permission sets</td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)

Note

- Requirement: Salesforce Standard Data Model version 1.130 or higher.
- Agent Optimization supports [Agentforce (Default)](https://help.salesforce.com/s/articleView?id=ai.agent_setup_enable_default.htm&type=5&language=en_US), [Agentforce Employee Agent](https://help.salesforce.com/s/articleView?id=ai.agent_employee_agent_setup.htm&type=5&language=en_US), and [Agentforce Service Agent](https://help.salesforce.com/s/articleView?id=ai.service_agent_setup.htm&type=5&language=en_US).
- Agent Optimization supports agent sessions in all languages. However, it shows the analysis and insights in English.
- Agent Optimization supports voice agents.

**Einstein Trust Layer Service Support:** Feature supports Data Masking, Data Limitation and Billing, and Privacy (personally identifiable information, or PII Masking). Agent Optimization impacts your credit consumption. Storing and querying Agent Optimization data consumes Data 360 credits.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_important.png)

Important Default LLM providers, dependencies, and geo-aware routing

- Agent Optimization supports only **OpenAI** and **Bedrock Anthropic** for session analysis.
- Session analysis follows your agent's model selection and chooses **OpenAI** for **Salesforce Default** and **Bedrock Anthropic** for **AWS Hosted**.
- For Civilian Government Cloud organizations, **Anthropic** is the default provider because OpenAI isn't supported for batch calls.
- If you select Gemini or another unsupported model provider as your org-level default, Agent Optimization stops working.
- Keep the optimization provider that corresponds to your selected org-level default enabled in **Manage Model Provider Access**. Turning off that provider stops Agent Optimization from working.
- LLM requests for Agent Optimization aren't subject to [geo-aware routing](https://help.salesforce.com/s/articleView?language=en_US&id=ai.generative_ai_platform_geo_aware_routing_anthropic.htm&type=5) and may be processed outside your org's geographic region.

#### See Also

- [Set Up Agentforce Session Tracing](https://help.salesforce.com/s/articleView?id=ai.generative_ai_session_trace_setup.htm&release=264.0.0&type=5 "Turn on Agentforce Session Tracing to collect and store, in Data 360, detailed data about agent sessions. By default, Agentforce Session Tracing is off. For orgs with only one dataspace, it’s turned on by default when Agentforce is turned on.")

## Set Up Agent Optimization for Standard Environments

Turn on Agent Optimization in your Salesforce organization to start analyzing agent sessions and optimizing performance.

1. Before enabling Agent Optimization, make sure that Data Cloud is provisioned and turned on in your organization, and that you have an active agent.
2. Make sure that Einstein Generative AI (see [Set Up Einstein Generative AI](https://help.salesforce.com/s/articleView?id=ai.generative_ai_enable.htm&release=264.0.0&type=5 "Set up Einstein generative AI to get access to powerful generative AI features.")) and Agentforce (see [Enable Agentforce](https://help.salesforce.com/s/articleView?id=ai.agent_setup_enable.htm&release=264.0.0&type=5 "Turn on Agentforce to start building, customizing, testing, and launching AI agents.")) are turned on in your org.
3. Verify that you have the latest version of the Salesforce Standard Data Model (version 1.130 or higher) in your org (sandbox or production). From Setup, go to **Apps** -> **Packaging** -> **Installed Packages** -> **Salesforce Standard Data Model**. To get the required version, click [here](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tKe000000Pc4v) and follow the instructions.
4. In Setup, in the Quick Find box, enter and then select **Einstein Audit, Analytics, and Monitoring Setup**.
5. Turn on **Agentforce Session Tracing**, if it's not already turned on. See [Set Up Agentforce Session Tracing](https://help.salesforce.com/s/articleView?id=ai.generative_ai_session_trace_setup.htm&release=264.0.0&type=5 "Turn on Agentforce Session Tracing to collect and store, in Data 360, detailed data about agent sessions. By default, Agentforce Session Tracing is off. For orgs with only one dataspace, it’s turned on by default when Agentforce is turned on.").
    
    **Agent Optimization** is turned on automatically when you turn on Session Tracing. For details, see [Agentforce Session Tracing](https://help.salesforce.com/s/articleView?id=ai.generative_ai_session_trace.htm&release=264.0.0&type=5 "Agentforce session tracing captures detailed agent interaction data in a unified data model on Data 360. Build dashboards, reports, and queries on this data to derive insights into agent behavior and trends. Take data-driven action while testing, debugging, and monitoring agents in sandbox or production environments.").
6. In Setup, locate **Users**.
7. Assign users the **Access Agent Optimization** permission set.
8. Save your work.

## Set Up Agent Optimization for DC1 Environments

DC1 (Data Cloud One) support refers to a configuration where multiple Salesforce organizations share a single Data 360 instance. This setup allows for efficient data management and collaboration across organizations, with one "home organization" and multiple "companion organizations" or "LOB (Line of Business) organizations."

Companion Organization Enablement: To turn on Agent Optimization for companion organizations, Einstein Setup must first be turned on in your home organization. After that, the process for enabling Agent Optimization in each organization remains the same. If you turn on Agent Optimization from a companion organization, Data Cloud assets are provisioned in the home organization, and then shared to the companion organization.

The home and companion organizations operate independently, and each organization shows analytics only for its own agents.

You can select different data spaces for each organization where Agent Optimization is turned on.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_important.png)

Important In DC1 environments, LLM calls generated by Agent Optimization are aggregated across all organizations (home and companion organizations) and aren't separated by individual organization.

Restriction

If more than one agent with the same API name exists in more than one organization, and if the organizations share the data space, then the agents are aggregated into the same view and appear as one agent.

To avoid this limitation, do one of the following:

- Create different API names for agents across organizations.
- Select different data spaces for each organization.
- Create a data governance rule to control which data groups have viewing permissions.

1. Make sure that Einstein Generative AI (see [Set Up Einstein Generative AI](https://help.salesforce.com/s/articleView?id=ai.generative_ai_enable.htm&release=264.0.0&type=5 "Set up Einstein generative AI to get access to powerful generative AI features.")) and Agentforce (see [Enable Agentforce](https://help.salesforce.com/s/articleView?id=ai.agent_setup_enable.htm&release=264.0.0&type=5 "Turn on Agentforce to start building, customizing, testing, and launching AI agents.")) are turned on in your home org.
2. Make sure that your companion organization has Salesforce Foundations or Agentforce 1 and an active companion connection.
3. Verify that Data Cloud One appears in your home organization.
4. Assign users the required permission sets in your companion organization: **Access Agent Optimization** and **Data Cloud One User**.

## Set Up Agent Optimization for Sandbox Environments

Turn on Agent Optimization in sandbox environments for testing and development purposes. Sandbox support requires specific configuration steps to reconnect connectors and activate data streams.

1. Provision Data Cloud in the sandbox organization.
2. Install or upgrade the Salesforce Standard Data Model package to version 1.130 or higher in the sandbox organization. When installation is complete, verify the version on the **Installed Packages** page in Setup.
3. Reconnect connectors.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)
    
    Note While connections are replicated to your sandbox, authentication data is not. As a result, all connectors appear in a "Needs Activation" state.
    
    From Setup, go to Data Cloud Setup > Ingestion API > AgentOpt, and click **Activate**.
4. Retoggle **Agentforce Session Tracing**. Agent Optimization is turned on automatically when you turn on Session Tracing.
    
    All data streams activate automatically.