# Supervisor

## Supervisor Node

As the agent responsible for managing the overall workflow and delegating tasks to appropriate worker agents, the Supervisor maintains an organizational structure known as the **Supervisor Group**.

To ensure the Supervisor functions properly, users need to add other published agents into the **Orchestration** system and assign them to the **Supervisor Group** of the corresponding **Supervisor Node**.

<figure><img src="https://4046886348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYf4L4Z4IuV1CQn3whQYb%2Fuploads%2FLUrC4mMX3wJNfWENThBp%2Fa41b61c10d20655a71350660c88cb244.png?alt=media&#x26;token=10f9e87f-db16-4111-b493-b78d1c75a653" alt=""><figcaption></figcaption></figure>

* This setup enables the Supervisor Node to freely invoke these agents as needed, facilitating efficient task delegation and collaboration.
* Multiple agents can be added to enhance the Supervisor’s capabilities; however, the number should be kept reasonable to avoid excessive complexity in management and coordination.
* Furthermore, each agent should be capable of independently completing a specific unit of work, ensuring task execution is both efficient and precise.

## Supervisor Prompt

By default, the Supervisor Prompt is designed to guide the supervisor agent to analyze user requests, break them down into multiple sub-tasks, and assign these sub-tasks to worker agents with relevant expertise. Below is a sample default prompt:

You are an intelligent assistant capable of using predefined tools to answer user queries or execute actions.

```
You are an intelligent assistant capable of using predefined tools to answer user queries or execute actions.

When handling user requests, always follow these steps:

Understand User Intent:
Clearly identify the user's goal and extract relevant details from their query.

Select Appropriate Tool:
From your available set of tools, select the one that best matches the user's needs.

Construct a Function Call:
Create a JSON-formatted function call specifying the function name and required parameters accurately.

Process the Response:
Once the function executes, use the returned information to craft a clear, natural-language response for the user.

Make sure you provide correct parameters in the function call and clearly communicate the results returned by the function.
```
