---
schema_version: "1"
id: 95e752356f07e29188804b4474a5725c1f9d87ef106932ab1019a6bf8075ce72
title: Create a Custom Subagent
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_topics_add_custom.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_topics_add_custom.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d5582e8fb9b9460b543b1b9a7f0dfc4640da8c95261e54e6a40e1577b51d5a64
description: You can create a custom subagent from the asset library or from within an agent in Agentforce Builder. When you create a subagent from the asset library, it’s available to add to multiple agents and versions. When you create a subagent from within an agent in Agentforce Builder, it’s available only to that agent.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Create a Custom Subagent

You can create a custom subagent from the asset library or from within an agent in Agentforce Builder. When you create a subagent from the asset library, it’s available to add to multiple agents and versions. When you create a subagent from within an agent in Agentforce Builder, it’s available only to that agent.

### 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 Beginning in April 2026, agent topics are now called subagents. There are no changes to functionality. During this transition, you may see a mix of the new and previous terms in our documentation.

<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="d54451e80">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d54451e80 ">To create a custom subagent:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d54451e80 ">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>

## Create a Custom Subagent in Agentforce Builder

When you create a subagent from an agent in Agentforce Builder, it’s available only to that agent. Any changes you make apply only to this agent version. To make a subagent available to add to other agents and agent versions, create it in the asset library instead.

To make changes to your agent, it must be in a draft state. If you want to make changes to a committed agent, [create a new draft](https://help.salesforce.com/s/articleView?id=ai.agent_versions_draft.htm&release=264.0.0&type=5 "Create multiple versions of an agent to seamlessly iterate on your agent’s design. Create a version to experiment with different instructions, subagents, or actions and preserve your current configuration. Or create a version to save as a backup, so you can revert quickly.").

![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

These steps cover how to create a subagent in Canvas view, but there are a few ways to create a subagent in Agentforce Builder.

- Ask Agent Optimizer to create a subagent for you. Provide the details about the job you want your agent to be able to do, and Optimizer generates and tests a subagent and actions for you. You can accept or decline any changes.
- Create a subagent in Script view.

1. From the Agents list in the Agentforce Studio app, open the agent you want to add a subagent to.
2. From the Explorer panel, hover over Subagents and click ![Plus sign icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agent_builder_plus_icon.png).
3. Select **Create new subagent**.
4. Give the subagent a name, and then click **Create and Open**.
    
    Your custom subagent is added to your agent. If you use the Agent Router to control subagent routing and classification, your subagent is added to the Agent Router’s actions available for reasoning.
5. Edit your description, reasoning instructions, and actions available for reasoning. Make sure to save your changes.
    
    [Learn more about the parts of a subagent.](https://help.salesforce.com/s/articleView?id=ai.agent_topics.htm&release=264.0.0&type=5 "A subagent is a job an agent can do. Learn about the parts of a subagent and how to use them to define an agent’s logic, reasoning, and conversational capabilities.")
6. Optionally, add an action to your subagent.
    1. From the Explorer panel, hover over your subagent, and then click ![Plus sign icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agent_builder_plus_icon.png).
    2. Add one or more actions from the asset library, or create a custom action.
        
        When you add an action from the asset library, always review and customize the action to meet your business needs, including the underlying flow, prompt template, or other reference action.
    3. Reference the action in your subagent's reasoning instructions, actions available for reasoning, or both.
        
        Your action is automatically added to actions available for reasoning.

Your subagent is available only in this agent version and isn’t available in the asset library. Any changes you make to the subagent apply only to this agent version and don’t affect other agents. If you change the name of your subagent, manually update any references to the subagent in the Agent Router or any other subagents.

## Create a Custom Subagent from the Asset Library

Create a custom subagent from the asset library to make your subagent available to multiple agents and versions. Then add it to one or more agents.

1. From Setup, enter Agentforce Assets, and then select **Agentforce Assets**.
2. From the Subagents tab, click **New Subagent**.
3. Complete all required fields. You must add at least one subagent instruction. Optionally, to use AI to evaluate your subagent fields and suggest improvements, click ![Gen AI sparkle icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agent_sparkle_icon_white.png). Then click **Next**.
    
    Currently, subagents created in the asset library follow the style of subagents in the legacy Agentforce Builder. For information about the parts of a subagent and best practices for subagent instructions, see [Subagents in the Legacy Builder](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."). The subagent is supported for agents created in either builder and can be customized after you add it to an agent.
4. Select the actions from the asset library that you want to add to your subagent, and then click **Finish**.

Your subagent is available in the asset library. To use your subagent, [add it to an agent](https://help.salesforce.com/s/articleView?id=ai.agent_topics_add_asset.htm&release=264.0.0&type=5 "Add a standard subagent to your agent to start from an example built to handle a common business use case. Or add a custom subagent that you built yourself. When you add a subagent to your agent from the asset library, a copy of the subagent is added to your agent.").

When you add a subagent to an agent from the asset library, a copy of the subagent is added to your agent, and you can edit this copy. Any changes you make to the subagent apply only to this agent version and don’t affect other agents or the subagent in the asset library.

Any changes you make to the subagent in the asset library aren’t synced to any copies of the subagent you’ve added to agents. To apply changes made to a subagent in the asset library to an agent, add the updated subagent to the agent.