---
schema_version: "1"
id: d5dbbc05caaa167426ba7570159a309cf8aa9cee1075b86f0fd932e15494df0a
title: Create a Custom Subagent in the Legacy Builder
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/copilot_topics_add_custom.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.copilot_topics_add_custom.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c20fa6ec99ed7489a38e96f82230ecc7b95969fe403fd64267084662f8230ad6
description: Create a custom subagent to specify the actions and instructions an agent needs to meet your users’ particular business needs.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Create a Custom Subagent in the Legacy Builder

Create a custom subagent to specify the actions and instructions an agent needs to meet your users’ particular business needs.

### 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>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d73209e72">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d73209e72 ">To create a custom subagent:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d73209e72 ">Manage AI Agents AND <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;type=5&amp;language=en_US" target="_blank">the required permissions for your agent
                type</a></td>

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

Before you begin:

- Identify the actions you want to add to your subagent and [create any custom actions](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_custom.htm&release=264.0.0&type=5 "With custom actions, you can extend your agent with Salesforce functionality so that it’s ready to assist users with tasks specific to your business. Build custom actions using Apex, flows, prompt templates, and API integrations.").
- Review [the parts of a subagent](https://help.salesforce.com/s/articleView?id=ai.copilot_topics.htm&release=264.0.0&type=5 "A subagent is a particular job an agent can do and an essential element of an agent’s reasoning. A subagent contains actions, which are the tools available for the job, and instructions, which tell the agent how to make decisions. Collectively, the subagents assigned to your agent define the capabilities your agent can handle. Salesforce provides a library of standard subagents for common use cases, and you can create custom subagents to meet your users’ specific business needs.") and [best practices for writing subagent instructions](https://help.salesforce.com/s/articleView?id=ai.copilot_topics_instructions.htm&release=264.0.0&type=5 "Subagent instructions set guidelines for agent behavior and give an agent the context it needs to do its job. Review best practices for writing subagent instructions to reduce latency and help your agent respond accurately and consistently.").

1. From the Agentforce Agents Setup page, launch your agent in Agentforce Builder.
2. If your agent is active, [deactivate it](https://help.salesforce.com/s/articleView?id=ai.copilot_setup_activate_deactivate.htm&release=264.0.0&type=5 "Activate your agent to make it available to your customers or employees. When an agent is deployed to one or more channels, including the Agentforce panel, activating the agent makes it immediately available to your users.").
3. From the left rail, select **Subagents**.
4. On the Subagents panel, click **New**, and then select **New Subagent**.
5. Review the generated content in each field. You can retain the generated content and modify it to your requirement. Alternatively, you can reject the generated content altogether by clicking ![Trashcan icon for deleting content.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/prompt_builder_delete_inline.png) , and then entering the details for each field yourself. Include at least one instruction. For supported agent types, you can optionally specify any conversation recommendations. Save your work.
    
    To learn more about these fields, see [AgentSubagents](https://help.salesforce.com/s/articleView?id=ai.copilot_topics.htm&release=264.0.0&type=5 "A subagent is a particular job an agent can do and an essential element of an agent’s reasoning. A subagent contains actions, which are the tools available for the job, and instructions, which tell the agent how to make decisions. Collectively, the subagents assigned to your agent define the capabilities your agent can handle. Salesforce provides a library of standard subagents for common use cases, and you can create custom subagents to meet your users’ specific business needs.").
6. Select the actions you want to add to your agent, and then click **Finish**.

Your custom subagent is assigned to your agent. To test your custom subagent, restart the preview conversation to apply your changes.

Before activating your agent and making your subagent available to your users, carefully test and iterate on your subagent’s details, especially your subagent’s instructions. To test your subagent, open the agent in Agentforce Builder and start a preview conversation. Enter utterances that you expect to trigger your subagent and actions, and then adjust your subagent’s details based on your results.

You can view or edit your custom subagent from the Subagents panel in Agentforce Builder. To view or edit your subagent’s details, click the subagent name and select the **Subagent Configuration** tab. To view, add, or remove agent actions from your subagent, select the **This Subagent’s Actions** tab.