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
Note Agent Optimization is available in sandbox, DC1, and Civilian Government Cloud organizations.
Access and view Agent Optimization Assign Access Agent Optimization and Data Cloud User permission sets
Note
Note

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
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 and may be processed outside your org's geographic region.

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) and Agentforce (see Enable Agentforce) 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 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.
    Agent Optimization is turned on automatically when you turn on Session Tracing. For details, see Agentforce Session Tracing.
  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
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) and Agentforce (see Enable Agentforce) 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
    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.