# Instructions, Assets, and Sub Agents

When Aissistant responds to a user’s inquiry, it doesn’t just guess the answer — it intelligently pulls context and instructions from three main sources: **workspace instructions**, **assets**, and **sub-agents**. Each plays a unique role in shaping how Aissistant understands and replies. Let’s break down the difference.

***

### **🔧 1. Workspace Instructions – The Global Rulebook**

**What they are:**\
These are the **global instructions** that guide Aissistant’s behavior across all conversations.

**How they work:**\
Workspace instructions are automatically included **every time** Aissistant generates a response. Because they apply globally, they are meant to be **brief, high-level**, and **always relevant**.

**Example:**

> “Always answer in a friendly and professional tone.”\
> “Use markdown for formatting.”

***

### **📚 2. Assets – The Business Knowledge Base**

**What they are:**\
Assets are the **documents, web pages, or resources** that contain your business-specific knowledge.

**How they work:**\
Assets are stored in our system as **trunks**, which are smaller segments of the original content. For instance, if an asset is a large manual, it will be split into multiple trunks. When a user asks a question, instead of returning the whole asset, Aissistant searches through these trunks to find relevant information. If a useful trunk is found, it’s added to the response context. You can think of this as Aissistant’s built-in search engine, retrieving just the right slice of knowledge to answer the query.

**Example:**

> An FAQ page, product documentation, or internal troubleshooting guide.

***

### **🤖 3. Sub Agents – The Specialized Experts**

**What they are:**\
Sub-agents are **scenario-specific configurations** that give Aissistant special instructions for certain types of requests.

**How they work:**\
If a user’s message matches a scenario defined in a sub-agent (like billing issues, shipping delays, etc.), the sub-agent's instructions are added to guide the reply.\
If the sub-agent has assets linked to it, Aissistant will also search trunks in **those** assets and include any relevant trunks — improving **accuracy** and reducing **latency**.

**Example:**

> A sub-agent called `shipping` might handle shipping questions and only search shipping policy documents.

***

### 🧩 Putting It All Together

When Aissistant replies, it checks:

1. **Workspace Instructions** – Always included
2. **Sub-Agent** – If triggered, instructions are included, linked asset searched and included if relevant
3. **Asset** – Searched and included if relevant

By combining these layers, Aissistant delivers fast, relevant, and accurate responses tailored to each situation — just like a well-trained human support agent.


---

# 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/instructions-assets-and-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.
