---
schema_version: "1"
id: c734e6c88736e633e86da6866845ba3730c1a5342e9840547297ef2b638ca3a0
title: Build, Extend, and Troubleshoot with Agent Optimizer in Agentforce Builder (Beta)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_optimize_dev.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_optimize_dev.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c5e240317de0bc52e17d7bd0b189ee03a983f1db37c0754f804e38f72d2114fb
description: Focus on what you want your agent to do, not how to configure or fix it. Agent Optimizer is a built-in coding agent that extends, refines, and troubleshoots your agents directly in Agentforce Builder, at no additional cost. Explore use cases and considerations for working with Optimizer.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Build, Extend, and Troubleshoot with Agent Optimizer in Agentforce Builder (Beta)

Focus on what you want your agent to do, not how to configure or fix it. Agent Optimizer is a built-in coding agent that extends, refines, and troubleshoots your agents directly in Agentforce Builder, at no additional cost. Explore use cases and considerations for working with Optimizer.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions. <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;release=264.0.0&amp;type=5" title="Learn about agent types and default templates for specific clouds and common use cases.">Required add-on licenses vary by agent type.</a></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

Agent Optimizer in Agentforce Builder (formerly known as Agentforce Development Agent) is a beta service that is subject to the Beta Services Terms at [Agreements - Salesforce.com](http://salesforce.com/) or a written Unified Pilot Agreement if executed by Customer. Use of this beta service is at the Customer's sole discretion.

If you prefer the previous assistant experience, you can opt out of the beta. In Setup, from the Einstein Setup page, turn on **Disable Agentforce Development Agent (Beta)**.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:20%">
        <col style="width:80%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d20917e89">Use Cases</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d20917e92">How Agentforce Can Help</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Use Cases" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e89 ">Add new capabilities to your agent</td>

          <td data-label="How Agentforce Can Help" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e92 ">
            <p>You don't have to be an Agent Script developer to build out an agent. Describe what you want in
              plain language. For example, ask Optimizer to add a subagent that looks up order
              details and requires user verification. Agentforce handles the rest.</p>
            <p style="margin-bottom:0;">Optimizer searches for relevant actions in your org and asset library, creates any subagents, and
              updates the Agent Router. If it can't find an existing action that fits your use
              case, it creates a placeholder with the metadata your agent needs and flags it for
              you to finish. When it's done, it explains what it plans to change and why, and it
              simulates the change to confirm that it works as expected. You can accept or decline
              before anything is applied.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Use Cases" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e89 ">Refine or restrict your agent's behavior</td>

          <td data-label="How Agentforce Can Help" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e92 ">
            <p>Whether you're fine-tuning after an initial rollout or enforcing compliance guardrails, ask
              Optimizer to update routing conditions and access rules without rebuilding Agent
              Script from scratch. For example, restrict a refund subagent to customers with a
              "delivered" order status, or limit escalation to customers above a certain
              entitlement tier.</p>
            <p style="margin-bottom:0;">Optimizer proposes targeted adjustments and validates them in preview to identify and fix any
              downstream issues before you apply them.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Use Cases" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e89 ">Troubleshoot unexpected agent behavior</td>

          <td data-label="How Agentforce Can Help" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e92 ">
            <p>When your agent behaves unexpectedly in testing or production, describe what it's doing instead
              of what you want, or ask Optimizer to explain a specific error. You can also use it
              to fix Agent Script validation issues flagged on save or in the console. If you’re
              testing your agent’s behavior in a preview conversation, click <strong class="uicontrol">Ask
                Optimizer</strong> in the Interaction Summary panel to add the conversation to
              Optimizer's context, and then send a message.</p>
            <p style="margin-bottom:0;">Optimizer surfaces likely root causes, such as missing instructions, ambiguous subagent routing,
              or empty variables. It proposes and validates targeted fixes for you to review, so
              you don’t have to manually review your agent’s full script.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Use Cases" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e89 ">Test your agent conversationally, and fix what you find</td>

          <td data-label="How Agentforce Can Help" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e92 ">
            <p>Ask Optimizer to run a quick health check on a specific subagent or conversation path. You can
              ask it to test against different personas (for example, "test this as a frustrated
              customer"), variations in user inputs, or edge cases. Describe the scenarios that
              you want to validate, such as whether a returns subagent handles requests correctly
              or an order lookup routes as expected.</p>
            <p style="margin-bottom:0;">Optimizer generates representative test conversations, simulates them concurrently in preview,
              and summarizes what it finds, including any latency, routing issues, or gaps. Then
              you can then ask it to fix what it found. Instead of a generic rewrite, it proposes
              targeted fixes and then re-runs the tests to confirm that the fixes worked.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Use Cases" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e89 ">Validate and optimize your agent after upgrading from the legacy builder</td>

          <td data-label="How Agentforce Can Help" class="slds-cell-wrap" style="vertical-align:top;" headers="d20917e92 ">
            <p>When you migrate or upgrade an existing agent, you can use Agentforce or third-party AI coding
              tools to do most of the work. But metadata and syntax differences between the legacy
              and new builder can still cause initial validation errors. Use Optimizer to resolve
              those errors without memorizing Agent Script syntax.</p>
            <p style="margin-bottom:0;">You can also ask Optimizer to optimize your agent's script to improve quality and follow Agent
              Script best practices, so you get the most from your new agent. It reviews your
              natural language instructions, suggests improvements, and adds deterministic
              controls to improve reliability and performance.</p>
          </td>

        </tr>
      </tbody>
    </table>

## Considerations for Using Agent Optimizer in Agentforce Builder

- Agent Optimizer is included in all SKUs, licenses, and editions that grant access to Agentforce Builder at no additional cost. It doesn’t incur billing or consume credits.
- Agent Optimizer reasons in increments of five minutes. If your task is more complex, Optimizer pauses and gives a summary of what it’s completed so far and the remaining steps. It retains the context of what it was working on, so you can ask it to resume and it picks up where it left off.
- When you refresh Agentforce Builder during a conversation with Agent Optimizer, a new session starts and context resets. Minimizing Optimizer doesn’t affect an ongoing conversation.
- Agent Optimizer uses the same APIs used in Agentforce Builder Preview to run tests behind the scenes. When it tests your agent, it runs concurrent preview conversations in simulate mode. It repeats this test-and-fix process as needed to validate your agent's behavior.
- Agent Optimizer uses the same reasoning model that you’ve specified for Agentforce agents overall. See [Select Agentforce Model Option](https://help.salesforce.com/s/articleView?id=ai.agent_setup_select_model_provider.htm&release=264.0.0&type=5 "We recommend using the Salesforce Default model option for Agentforce, which enables Salesforce to select the best model mix for agent accuracy and performance. But you can choose an AWS-Hosted or Google Gemini model option instead.") to learn more about available models for Agentforce agents and how to change your model selection.
- The Agent Optimizer in Agentforce Builder beta experience is available in the assistant panel automatically. But if you prefer the previous assistant experience, you can opt out of the beta. In Setup, from the Einstein Setup page, turn on **Disable Agentforce Optimizer (Beta) in Agentforce Builder**. This setting controls the chat experience and agent capabilities only.