# Step-by-Step Wizard for Creating a New AI Agent
## Overview:
New users often find it difficult to set up an AI agent from scratch. To simplify onboarding, we introduce a **wizard-style guided flow** that helps users create their first AI bot step by step. Using our **ML-driven mechanism**, the system will automatically pre-fill agent details based on the **purpose** provided by the user, while still allowing them to edit and customize.
Previously, users had to manually provide long and detailed descriptions to set up an AI agent — a process that was both **time-consuming** and **complex**, especially for non-technical users. With this guided approach, most of the setup is automated and only requires minimal input from the user.
This feature ensures **seamless onboarding**, enabling even non-technical users to create a working AI agent in minutes.
---
## 1. Agent Initialization :
* User clicks “**Generate Agent**”.
* User enters:
* **Name** (e.g., “Restaurant Reservation Agent”)
* **Description** (short bot purpose)
* **Purpose** (User should add full description and requirements of the Agent.)
* **Profile Type** (Inbound, Outbound)
* On **Save & Continue**, the system sends purpose → our **ML Workflow** to generate **automated** content for later steps.
---
## 2. Agent Settings:
* User is directed to **Settings** Page.
* Fields such as:
* **Voice Language** (e.g., English, Greek, Hindi) (Default: English)
* **Topic**
* **Sorry Message**
* **Disclaimer**
* **Talk Time & Delay Settings**
* **Delay Response Message**
* All fields are **auto-filled** based on **purpose** and the detected **requirements** of the user, using the our **ML Flow**.
* **Edit Option**: Each section has an **Edit** button.
* Clicking **Edit** allows the user to provide a **prompt** (e.g., “Make the disclaimer more formal”) → our **Workflow** updates only that section dynamically.
* **Save & Continue** moves to next step.
---
## 3. System Configuration:
* **Response to Silence** **(Dropdown)**
* On expand → show form (Maximum Responses, Silence Threshold, Silence Response).
* **ML mechanism** auto-generates **automated Silence Response message**.
* User can edit manually if needed.
* **STT Configuration (Dropdown)**
* On expand → show form API Key, Region, Word Level Time, Punctuation, Silence timings, etc.).
* **User must manually add API Key and Region.**
* **TTS Configuration (Dropdown)**
* On expand → show form for TTS API Key, voice id, mode id, etc.
* **User must manually add API Key**
---
## 4. Welcome Page (System Instructions):
* Fields are **auto-filled** based on **purpose** and the detected **requirements** of the user, using our **Mechanism**.:
* **Role and Responsibility**
* **Glossary**
* **General Instructions**
* **Key Context Points**
* **Communication Instructions**
* **Conversation Stages**
* Clicking **Edit** allows the user to enter a refinement prompt.Our **intelligent system** then updates only that specific section dynamically, without affecting the rest of the content.
* Example: User clicks edit → types “Make the communication instructions more friendly” → **ML mechanism** updates only that field.
* **Save & Continue** → moves to **Dialog Step**.
---
## 5. Dialog (Communication Stages):
* **ML mechanism** auto-fills conversation design:
* **Introduction Stage** (e.g., “Hello! Welcome to ABC Restaurant…”)
* **Identity Verification Stage** (if needed for the use case)
* **Identification URL**
* Two or more **Stages**
* User manually add **Identification URL**
* User can **Add more stages with our ML workflow or manually**
* User can **Edit** or **Delete** dialog **Stage data**
* **Editable with prompts** for each section.
* **Save & Continue** → moves to **Farewell Step**.
---
## 6. Farewell:
* **Farewell Stage Instruction** Field auto-filled by **ML mechanism**
* Clicking **Edit** allows the user to provide a **prompt** to update that field.
* Final **Generate Agent** completes agent creation.
---
## Note:
> In these steps, we are **not covering the Workflow (Feature) page**.
> For now, after generating the agent, a message will be displayed guiding the user to navigate manually to the **Workflow (Feature) page** in order to add **Tools, Forwarding Numbers, or Agent Forwarding**.
---
## Database Schema:
For these Steps We need to add One field of **Purpose** in our **KalimeraAiAgent** table.
---
## Draft Management and Finalization:
* **Step Progression & Draft Save**
* On every **Save & Continue**, the system:
* Saves the current step data as a **draft** in **Redis**.
* Sends the purpose to the **ML mechanism** to generate automated content for upcoming steps.
* **Finalization**
* On the **last step**, when the user clicks **Generate Agent**:
* All draft data from Redis is merged and persisted into the **database** (KalimeraAiAgent table).
* Draft entry in Redis is cleared after successful save.
* **Cancellation Handling**
* If the user clicks **Cancel** in any step or on the final step:
* The draft stored in Redis is deleted.
* No entry is created in the database (agent is not generated).
---