# Create Sub Agents

*Last updated: June 6, 2026*

Sub agents define how Aissist handles specific scenarios.

Use them to detect intent, apply targeted instructions, trigger actions, and control handoff to humans.

Sub agents can also link to assets or actions for the workflow they handle.

### What sub agents do

Sub agents help you:

* organize conversations by scenario
* add contextual instructions only when needed
* link the right assets and actions
* control whether Aissist replies, drafts, hands off, stops, or closes conversations
* generate summary notes

For example, an `order_tracking` sub agent can detect shipping questions, check order status, and return tracking details.

<figure><img src="/files/ZI4mYBcs7ewfcS7hpsT7" alt=""><figcaption></figcaption></figure>

### Create a sub agent

Go to the sub agent creation screen and define:

1. a clear scenario
2. optional contextual instructions
3. linked assets or actions
4. optional context, task, summary, and acknowledgement fields
5. session behavior for reply, no response, or closure

<figure><img src="/files/svhc187d9UxY29jgp6VO" alt=""><figcaption></figcaption></figure>

### Detection trigger

Choose when Aissist should detect the sub agent.

* **Inbound** — detect based on the user message.
* **Outbound** — detect based on Aissist's reply.

Use **Inbound** for user intents like returns or order status.

Use **Outbound** for outcomes like human transfer.

### Scenario

The scenario is the condition that triggers the sub agent.

Write it in simple language.

Examples:

* `user wants to make a return`
* `user asks where their order is`
* `user wants to cancel an order`

### Instructions

Instructions in a sub agent are contextual.

They apply only when that sub agent is detected.

Use them for scenario-specific handling, such as:

* ask for the order number
* check the return reason
* share the return policy
* tell the user a human will review the request

<details>

<summary>Context, task, summary, and acknowledgement</summary>

These fields add structure to the workflow.

* **Context** adds supporting information for the scenario.
* **Task** defines what Aissist should achieve.
* **Summary** captures structured output for your team.
* **Acknowledgement** sends a one-time message when the sub agent is first activated in the conversation.

Use acknowledgement for short notices or branding.

For example, an eSIM sales sub agent can collect travel details and generate a summary like:

```json
{
  "destination": "the destination of user travel",
  "number_of_days": "the number of days the user plans to travel",
  "number_of_esim": "the number of eSIMs the user wants"
}
```

The summary appears in the agent platform as a note or comment for the human team.

</details>

### Session controls

#### No Response for Current Interaction

Aissist ignores the current interaction and does not reply.

Use this for spam, no-reply emails, and out-of-office messages.

#### No Response After Current Interaction

Aissist responds once, then stops replying later in the same conversation.

Use this when you want to hand off after the current step.

You can combine this with gateway handover rules to send the conversation to the right human team.

#### Close

This closes the ticket or conversation when the sub agent is triggered.

{% hint style="info" %}
When **Respond only to messages recognized by listed sub-agents** is enabled, Aissist responds only when at least one listed sub agent matches.
{% endhint %}

<details>

<summary>Assets and actions</summary>

Sub agents can link to assets and actions.

Examples:

* Link `order_return` to a return policy asset.
* Link `order_tracking` to a Shopify `getOrder` action.

This keeps each workflow focused and relevant.

If asset retrieval feels noisy, review [Refine Assets](/tutorial/tune-aissist-behavior/refine-assets.md).

That page shows how to reduce unrelated context by linking assets to the right sub agents.

</details>

<details>

<summary>Agent platform behavior</summary>

When a sub agent is triggered, that tag is also added in the agent platform.

{% hint style="info" %}
Most agent platforms can use these tags for workflows, automation, and notifications.
{% endhint %}

<figure><img src="/files/pdLKwCWQL7uAV6dM8bL0" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Handover rules in gateways</summary>

Sub agents can also route conversations to human agents.

In the gateway setup, add handover rules for the workflows that need a human team.

<figure><img src="/files/k8YuJCYn7bhlDOHBFUMZ" alt=""><figcaption></figcaption></figure>

In each rule, choose:

* the sub agent that should trigger handoff
* the team that should receive the conversation

Use this when different workflows should go to different teams, such as billing, returns, or technical support.

See [Deploy Gateway](/tutorial/deploy-gateway.md) for gateway setup and [Streamline with Human Team](/tutorial/streamline-with-human-team.md) for routing patterns.

</details>

### Best practice

Start with a small set of high-value sub agents.

Build one for each major workflow, test it in real conversations, then expand over time.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.aissist.io/tutorial/create-sub-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
