Loading
Agentforce and Einstein Generative AI
Improve Agent Performance with Agent Optimizer (Beta)

Improve Agent Performance with Agent Optimizer (Beta)

Understand agent performance, identify high-impact problems, investigate their causes, and get suggestions for improving sessions in Agentforce Studio.

Required Editions

Available in: Enterprise, Performance, and Unlimited Editions with an Einstein for Sales, Einstein for Platform, Einstein for Service, Einstein 1 Service, or Einstein GPT Service add-on. To purchase add-ons, contact your Salesforce account executive.
Note
Note Agent Optimizer is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.

Considerations

  • Make sure that your org is collecting session tracing data and that you can access the agents and sessions that you want to investigate. Available results depend on your permissions, the selected agent and timeframe, the channels in use, and processed session data.
  • If Agent Optimizer isn't available, in Setup | Einstein Audit, Analytics, and Monitoring Setup, make sure that Agentforce Session Tracing, Agent Optimization, and Agentforce Optimization Agent are enabled.

Enable Agent Optimizer

Einstein Audit, Analytics, and Monitoring Setup with Agentforce Session Tracing, Agent Optimization, and Agentforce Optimization Agent enabled.

Agent Optimizer helps you understand how your agents are performing by analyzing session data and identifying patterns that can require attention. Ask questions in natural language to explore performance trends, investigate representative sessions, identify possible causes, and get suggestions for improvement.

  1. In Agentforce Studio, select Analytics.
  2. Select Ask Agentforce to open the Agent Optimizer panel.
    Service Agent Analytics page with Analytics and Ask Agentforce highlighted.
  3. Establish a performance baseline by asking for activity or trends for a specific agent type.
    Review the busiest day, session totals, and chart. Use a suggested follow-up to expand the timeframe or investigate a trend.
    Show me the distribution of the number of sessions day over day for [agent name].
  4. Identify and prioritize recurring failure patterns.
    Review the counts, impact, possible causes, and suggestions in the response. Focus on the issue that has the greatest impact on your users.
    Sample sessions from [agent name] from last week and identify failure patterns.
  5. Investigate a representative session for the pattern that you selected.
    Review the user's request, selected subagent, actions, errors, agent response, and later turns. Then open the session trace to confirm the sequence of events.

    Show me a session affected by the permission error and explain what happened.

    Agent Optimizer response showing the user's question, selected subagent, knowledge action, insufficient access error, agent recovery, and later turns.
  6. For operational errors, determine whether the problem was isolated or persistent.
    Ask when the errors occurred and which agents were affected. Compare the time window with session volume so that you don't treat a short traffic burst as an ongoing regression.

    Show me more details about the rate limiting errors.

    Agent Optimizer response showing the distribution and timing of rate-limiting errors, the affected agent, peak usage context, and key findings.
  7. Find questions that users ask often but that your agent can't answer with existing knowledge content.
    Before creating content, confirm that the issue isn't caused by missing permissions, retrieval configuration, or content that ranks poorly.

    What are the best knowledge candidates for FAQ creation?

    Agent Optimizer response listing frequently asked questions that have no knowledge coverage.
  8. Group failures by what users were trying to accomplish.
    Ask Agent Optimizer to categorize failures and cluster off-topic requests. Use the clusters to decide whether a request is outside the agent's scope or represents a recurring customer job that the agent should support.

    Categorize my session failures into action errors, knowledge gaps, and off-topic queries. Then show me the clusters of off-topic queries.

    Sample 50 sessions and give me more details about these gaps so that I can learn how to fix them.

    Agent Optimizer response explaining sampled action, reasoning, prompt, and content gaps and listing common action-gap patterns.
  9. Retrieve the sessions behind a recurring pattern.
    Verify the user request, agent response, assigned agent, date, and suggested fix. Use the session IDs to continue the investigation in Sessions & Intents and the session trace.
    Show me the sessions for the missing roadside-assistance dispatch action.
  10. Use a scorer to apply root-cause labels consistently across sessions.
    Create a scorer in Prompt Builder that reviews each session and returns a defined label. For example, define labels for missing content, missing or failed actions, unclear instructions, reasoning errors, and sessions with no clear failure. Apply the evaluator in Sessions & Intents, and then ask Agent Optimizer to compare the labeled sessions. For prompt patterns, see Custom Scorer Prompt Examples.

Use evidence from multiple representative sessions before changing your agent. Test the targeted change, deploy it through your normal process, and compare the same performance signals afterward to confirm that the change helped without causing regressions.

Get Better Results from Agent Optimizer

  • Ask for supporting evidence. Ask how Agent Optimizer reached a conclusion or which sessions are included in a pattern. Review the identified sessions before acting on the response.
  • Include a timeframe. For example, specify in the last 7 days or between May 30 and June 29. Without a timeframe, Agent Optimizer uses a recent default timeframe, which can differ from the period that you want to analyze.
  • Narrow the scope. Specify an agent or subagent when possible. Approximate names are supported and resolved to the corresponding agent or subagent.
  • Ask how many, and then ask why. First ask for an exact count, such as How many sessions escalated for the refund subagent last week? Then ask Why did those sessions escalate? to analyze the sessions behind the count.
  • Increase the sample when needed. Ask Agent Optimizer to review more sessions or widen the timeframe before reaching a conclusion. A single analysis can sample up to 1,000 sessions.
  • Provide a session ID for one conversation. For example, ask What happened in session [session ID]? or Why did session [session ID] escalate? to get a focused explanation.

Limitations

  • Diagnosis of a group of sessions is based on a sample, not every session in the group. The default sample is approximately 100 sessions, and the maximum is 1,000 sessions per analysis. Use counts when you need an exact total, and use sampled analysis to investigate possible causes.
  • Very recent sessions can be unavailable for detailed analysis. Conversation transcripts can take approximately 15–30 minutes to become available, so sessions that are less than 30 minutes old are excluded from detailed analysis.
  • If a requested metric or analysis is unavailable, the required source data or metric can be disabled for your org. Contact your Salesforce admin to verify that the required Agentforce metrics and session tracing data are enabled.
 
Cargando
Salesforce Help | Article