---
schema_version: "1"
id: aa4f32c1d595eb5840dfaa8ff8706dd9302057ac4718128b898a6cf90a545424
title: Subagent Classification and Routing
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_topics_routing.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_topics_routing.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2c1497f327c87ca4dfbd977a45a42882b4b82d53434aa05a63f89642f14ffe94
description: Learn more about the Agent Router and how to customize it to control how your agent selects subagents in a conversation.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Subagent Classification and Routing

Learn more about the Agent Router and how to customize it to control how your agent selects subagents in a conversation.

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

When you create an agent, a special subagent called the Agent Router is added to your agent and is defined as the starting subagent for every agent conversation. By default, the agent uses this subagent for subagent classification, which is the process of selecting the most relevant subagent based on what the user wants to do and the jobs that the agent can do. Transitions to all of the subagents in your agent are added to the Agent Router’s reasoning actions, which makes them available in the agent conversation. The agent compares the recent conversation history, including the user’s most recent message, to the names and descriptions of all of the subagents in the Agent Router’s reasoning actions to select the best match.

You can edit the Agent Router just like any other subagent, so you can customize [its reasoning instructions and actions](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.") to set initial variables and add logic to control your subagent classification and routing.

- Add conditions, actions, and variables to drive classification to particular subagents.
- Exclude a subagent from classification based on filters (Make this action available when:).
- Remove references to a subagent if you want the subagent to be accessible only via transitions from other subagents.

You can use filters and variables to control access and routing to subagents. For example, you can add filters based on a variable to ensure that certain subagents are available only to verified customers. In this example, conversations are routed based on the verified variable in reasoning actions. The Order Management, General FAQ, and Escalation subagents are available only when the customer is verified (verified equals True). If the customer isn’t verified (verified equals False), the conversation is routed to the Identify Verification subagent.

![Agent Router actions with filters added](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_topics_routing_filter.png)

By default, the Agent Router is defined as the starting subagent in your agent’s Agent Script. In other words, this is the subagent that uses the ‘start\_agent’ prefix instead of the ‘subagent’ prefix.

![Agent Script showing start\_agent prefix](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_topics_routing_script.png)

However, you can define another subagent as the starting subagent instead. You can choose to use the Agent Router to move to subagent classification later in the conversation, or you can remove the Agent Router from your agent altogether if you want to control subagent routing differently.

## Subagent Classification and Routing

From April 2026, agents created with the Agentforce Employee agent and Agentforce Service agent default templates in the new Agentforce Builder use the Salesforce-owned HyperClassifier model for subagent classification. The HyperClassifier model outperforms standard LLMs in speed and precision, particularly when following complex instructions or adhering to negative instructions.

This `start_agent` block in Agent Script configures HyperClassifier for subagent classification.

```
start_agent agent_router:
    description: "Welcome the user and determine the appropriate topic/subagent based on user input"
    model_config:
       model: "model://sfdc_ai__DefaultEinsteinHyperClassifier"
```

If you remove `model_config`, your agent defaults for subagent classification to the model option selection for Agentforce in Setup.

For more details, see [Configure Models in Agent Script](https://developer.salesforce.com/docs/ai/agentforce/guide/ascript-model.html) in the Agentforce Developer Guide.

#### See Also

- [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.")