# Supervisor Agent

The **Supervisor Agent** is a specialized AI agent in Lamatic.ai designed to manage and coordinate multi-agent flow. It serves as the central hub, collecting input, maintaining structured memory, and orchestrating the execution of sub-agents based on predefined logic. This ensures an efficient, iterative process for dynamic AI-powered applications such as structured decision-making systems and task automation.

## Why Use the Supervisor Agent?

- **Orchestrate Complex AI Flow:** Manage multiple agents dynamically, ensuring structured execution.
- **Maintain Context and Memory:** Retain past interactions to improve continuity in multi-step tasks.
- **Enable Adaptive Execution:** Define agent paths, loop conditions, and AI-generated decision trees.

## Key Features  
**Core Functionalities**
1. **Multi-Agent Coordination** 
2. **Memory Retention** 
3. **Agent Path Definition** 
4. **Loop Control**

**Advantages**
1. **Scalability** 
2. **Efficient Context Handling** 
3. **Adaptive Decision-Making** 
4. **Visual Workflow Representation**

## How to Use the Supervisor Agent?

### Creating a Supervisor Agent via Flow Editor  
1. **Add an Agent Node** 
2. **Define Agent Paths** 
3. **Configure Prompt Templates** 
4. **Select an LLM Model** 
5. **Set Loop & Stop Conditions** 
6. **Deploy & Connect**

### Creating a Supervisor Agent via Agent Dashboard  
1. **Navigate to the Agents Page** 
2. **Select Supervisor Agent** 
3. **Configure Agent Settings** 
4. **Deploy the Agent**

## Configuration Options  
| **Parameter** | **Description** | **Example Value** |
| --- | --- | --- |
| **Prompts** | Set system, user, and assistant prompts. | `System Prompt, User Prompt` |
| **Models** | Selects the AI model for text generation. | `GPT-4 Turbo` |
| **Tools** | Tools which can be added to the agent for additional processing of the generated text. | `Sentiment Analysis` |
| **Agent Paths** | Define execution paths for multiple sub-agents. | `Research Agent, Writer Agent` |
| **Messages** | System messages to guide the agent’s behavior. | `[{'user' : 'give me a write up for the topic : Claude vs GPT 4'}]` |
| **Stop Words** | Specifies trigger words to halt execution. | `
