# Advanced Agent Configuration Source: https://docs.aihive.global/agents/agent_nangcao Advanced Agent Configuration - AI Hive Documentation # **Advanced Agent Configuration** After creating a basic Agent, you can fine-tune technical parameters to make the Bot smarter and more suitable for your business needs. Access: Go to **Studio** -> Select the Agent to edit -> **Configuration** tab. image.png ## AI Model Settings On the left side of the screen, you'll see parameters that control the "brain" of the Bot. image.png * **Model:** * `GPT-4o`: Most intelligent, versatile, handles complex logic well. (Recommended for Sales/Customer Service). * `Claude 3.5 Sonnet`: More natural and emotional writing style. * `Gemini Pro`: Fast response speed, handles large data well. * **Temperature:** Slider from 0 to 1. * **Low (0 - 0.3):** Bot answers accurately, logically, less creative. Suitable for **Customer Service, Order Lookup**. * **High (0.7 - 1.0):** Bot is creative and imaginative. Suitable for **Marketing, Content Writing**. image.png * **Max Tokens:** Limits the length of the Bot's response. image.png ## Vision Feature Allows customers to send images to the Bot, and the Bot can "see" the content. * **How to enable:** Check the **"Allow Image Upload"** box. image.png * **Applications:** * Customer sends a photo of a defective product -> Bot identifies the defect for warranty. * Customer sends a photo of a dress sample -> Bot finds similar products in inventory. ## Variable Management Variables help the Bot remember customer information throughout the conversation (e.g., Name, Phone Number, Address). image.png * **System Variables (Default):** `user_name`, `language`. * **Custom Variables:** You can create new variables like `customer_phone`, `order_id`. * **How to use in Prompt:** Use the syntax `ten_bien`. * *Example:* "Hello \{\{user\_name}}, how can I help you?" *** ## Tool Integration For the Bot to perform real actions (like inventory lookup, shipping calculation), you need to give it "hands and feet". image.png * In the **Tools** section, click **+ Add Tool**. * Select the desired tool from the library: * `CRM Tool`: For checking inventory, creating orders. * `Calculator`: For price calculations. * `Google Search`: For searching the latest information online. *(Detailed instructions on advanced ERP/CRM integration will be covered in Tools)*. # Create Your First Agent Source: https://docs.aihive.global/agents/tao_agent_basic Create Your First Agent - AI Hive Documentation # Guide to Creating Your First AI Agent With just 4 simple steps, you'll have a smart virtual assistant ready to consult and close deals for your business. *** ## Step 1: Initialize Agent On the main interface of **Studio**, you'll find the shortcut to get started. 1. Access the **Studio** menu in the left sidebar. 2. Click the **"Create AI Agent"** button (Black) in the top right corner of the screen. image.png ## Step 2: Set Up Basic Information The Bot configuration screen will appear. Here you need to identify your virtual assistant. 1. **Create AI Agent:** Select the "Create AI Agent" button. 2. **Name:** Give it a memorable name (e.g., *XShop Consultant*). 3. **Description:** Write a brief summary of the Bot's mission. image.png ## Step 3: Role Configuration (Prompting) - Important This is the most critical step that determines the "intelligence" of the Bot. You have 2 ways to teach the Bot how to work: ### Method 1: Manual Prompting If you are familiar with Prompt Engineering or already have a detailed script, enter it directly into the **Instructions** box. * *Example input:* "You are a professional consultant. Please answer customers politely, concisely, and always suggest closing the deal..." image.png ### Method 2: AI Auto-Generate 🌟 This is an exclusive feature that helps you create a standard System Prompt without brainstorming. 1. After creating the Agent, a prompt creation window appears, allowing you to choose existing **Prompt Templates** or **Auto-Generate** a prompt. 2. If you don't want to use a template, in the **AI Generator** window, fill in the basic suggestions: * **What should the AI do?** (e.g., *Sell cosmetics, close orders, handle complaints*). * **Brand Name:** (e.g., *XShop Cosmetics*). * **Tone/Style:** (e.g., *Cheerful, use emojis, friendly address*). 3. Click the **Auto-Generate** button. 4. The system will think for a few seconds and write a long, logical Prompt. 5. Review the result; if satisfied, click **Apply** to save it to the Instructions box. image.png ## Step 4: Test & Save Before publishing, you need to test chat to ensure the Bot understands correctly. 1. Look at the **Preview** panel on the right side of the screen. 2. Type a test question (e.g., *"Hi, can you help me with size recommendations?"*). 3. If the Bot responds correctly, click the **"Publish"** button at the top to complete. image.png *** ## Result After successful saving, your new Agent will appear at the top of the list in the Studio screen with the `AGENT` tag. image.png # Messenger Integration Source: https://docs.aihive.global/channels/tich-hop-messenger Messenger Integration - AI Hive Documentation # Messenger Integration **Connect Facebook Messenger** is the standard process to integrate AIHive with your Fanpage, enabling the Bot to automatically respond to customer messages. *** ## Implementation Process ### Step 1: Publish Agent Before connecting, ensure your Agent is ready. 1. On the Agent configuration interface, click the **Publish** button in the top right corner. 2. The system will save all your latest Prompt, Knowledge, and Tools configurations. image.png ### Step 2: Access the Integration Menu 1. In the left menu bar, find and click on **Integrations** (or *Channels* depending on the version). 2. Find the **Facebook Messenger** card. image.png ### Step 3: Login to Facebook 1. Click the **Connect** button on the Facebook card. 2. A popup window appears. Click **"Continue as..."** to log in with the personal Facebook account that manages the Fanpage. image.png ### Step 4: Grant Page Management Permission (Important) This is the most critical step. 1. Select **"Edit previous settings"** (if you've connected before) or select from the new Page list. 2. **Crucial:** Check the box **"Apply only for the current Page"**. 3. Tick the exact **Fanpage** you want to integrate this Agent with. 4. Click **Next** and grant all required permissions (Manage Page, Send Messages...). > ⚠️ Note: If you do not grant full permissions, the Bot may not be able to read or reply to messages. image.png image.png ### Step 5: Complete 1. After granting permissions, click **Save** / **Done**. 2. Return to the AIHive screen, you will see the Fanpage status change to **Connected** (Green). image.png *** ## Testing After a successful connection, verify the integration: 1. Open the **Facebook** or **Messenger** app on your phone. 2. Go to the connected Fanpage. 3. Act as a customer and send a test message (e.g., *"Hello"*). 4. If the Bot responds immediately -> **You've succeeded!** 🎉 # ChatFlow Source: https://docs.aihive.global/chatflow/chat-flow ChatFlow - AI Hive Documentation # Guide: Building an "AI Quote Writing Assistant" with Chat Flow Are you tired of customers saying something vague like *"I want to build an app like Uber"* and then demanding a detailed quote immediately? Instead of spending 2 hours writing, this tutorial will show you how to use **AIHive Chat Flow** to create a Bot that does this automatically in just 30 seconds. We'll use **Chat Flow** - AIHive's drag-and-drop logic graph tool. You don't need to know coding! ## "Assembly Line" Concept Before getting started, imagine Chat Flow like a factory assembly line with workers sitting in sequence: * **Node (Block):** Each specialized worker (e.g., Node A specializes in analysis, Node B specializes in writing). * **Connectors:** Conveyor belts to transfer documents from one person to another. * **Variables** **`\{\{...\}\}`\*\*\*\*:** This is the most important concept. When Worker B wants to work, they must take Worker A's result to process further. > 🔑 Golden Rule: To get data from a previous Node, press the \{ key (curly bracket) in the input field to open the variable list. *** ## Step-by-Step Practice When you create a new Chat Flow, the Canvas screen will display 2 basic blocks: **Start** and **Answer** connected together. ### Step 1: Configure "Start" Node (Input) This node already exists, just click on it to edit. 1. Click on the **Start** node. 2. Ensure the configuration panel has the `sys.query` field. This is where customer chat messages are received. image.png ### Step 2: Add "BA Analysis" Node *Task: Read* *`sys.query`* *to analyze.* 1. Add an **LLM** node after Start, rename it to `BA_Analysis`. 2. In the "Context" section, select: `sys.query` 3. **Configure SYSTEM (Role):** > "You are a senior Business Analyst (BA) with 10 years of experience.\ > Task: From the customer's rough idea, break it down into a detailed list of Functional Requirements.\ > Clearly divide: End-user App, Admin Web (CMS/Admin), and Backend.\ > Output: Only list features as bullet points, keep it concise." 4. **Configure USER (Create context with Variables):** * Type the prompt: `Analyze the following customer request:` * **Insert variable:** Press `\{` key, select **sys.query**. * *Correct display:* `Analyze the following customer request: \{\{Start.sys_query\}\}` image.png *** ### Step 3: Add "Tech Architect" Node *Task: Read BA's analysis result to choose technology.* 1. Add an **LLM** node after BA, connect to BA, rename it to `Tech_Stack`. 2. **Configure Context:** Select `\{\{BA_Analysis.text\}\}` 3. **Configure SYSTEM:** > "You are a Solution Architect. Suggest the most optimal Tech Stack for this project.\ > Prioritize modern Stack: > * Mobile: Flutter (Cross-platform). > * Backend: Node.js (NestJS) or Supabase. > * Database: PostgreSQL. > Briefly explain the reasons for your choices." 4. **Configure USER (Create context with Variables):** * Type: `Based on the following functional analysis:` * **Insert variable:** Press `\{` key, select `\{\{BA_Analysis.text\}\}` * *Correct display:* `Based on the following functional analysis: \{\{BA_Analysis.text\}\}` image.png *** ### Step 4: Add "Write Quote" Node (Important) *Task: Read ALL previous variables to compile into a document.* 1. Add an **LLM** node after Tech\_Stack, rename it to `Write_Quote`. 2. In the "Context" section, select: **Tech\_Stack** / **text** 3. **Configure SYSTEM:** > You are a Sales Director. Your task is to write a professional, persuasive Technical Proposal to send to the customer immediately.\ > Format: Beautiful Markdown.\ > Required structure: > 1) Project Overview (Understand customer pain points). > 2) Scope of Work (from BA). > 3) Technical Solution (Tech Stack - from Architect). > 4) Implementation Roadmap (Estimated timeline by week). > 5) Budget Estimate (Reference price range in USD). > Tone: Professional, trustworthy, encouraging deal closure. 4. **Configure USER (Combine 3 variables into context):** You need to insert 3 variables sequentially for the AI to have complete information. Enter exactly as below: * Type: `1. Customer request:` Press `\{`, select **Start** / **sys.query** * Type: `2. Detailed features:` Press `\{`, select **BA\_Analysis** / **text** * Type: `3. Proposed technology:` Press `\{`, select **Tech\_Stack** / **text** The interface will look like: ```plain text theme={null} 1. Customer request: \{\{Start.sys_query\}\} 2. Detailed features: \{\{BA_Analysis.text\}\} 3. Proposed technology: \{\{Tech_Stack.text\}\} ``` image.png ### Step 5: "Answer" Node (Return Result) *Task: Get the final variable and display on screen.* 1. Click on the **Answer** node at the end. 2. In the **Response** field, delete all existing text. 3. **Insert variable:** Press `\{` key, select **Write\_Quote** / **text**. * *Correct display:* `\{\{Write_Quote.text\}\}` *** ## Common Error Troubleshooting During the process, 99% of beginners will encounter an error with red text: **"Please fill in context variable in PROMPT"**. > ⚠️ Cause: You used variable \{\{Start.query}} in the prompt, BUT you haven't declared it in the Context section of that Node. **Fix:** 1. Look below the **System** field of the erroring Node. 2. Find the **Context** section. 3. Click **Add**. 4. Select the exact variable you're using in the Prompt. 5. The red error will disappear. *** ## Result Now click the **Debug and Preview** button in the top right corner. 1. **Test input:** *"I want to build a medical appointment booking app."* 2. **Result:** You'll see the Nodes light up sequentially: * **BA** analyzes requirements. * **Tech** chooses technology stack. * **Sales** writes the proposal. * **Final:** Returns a full-page professional quote. image.png # Developers Source: https://docs.aihive.global/developers/developers Developers - AI Hive Documentation # Developer Documentation (Developers & API) AIHive provides a powerful toolkit (API & SDK) to help you integrate artificial intelligence into your website, mobile app, or internal management system (ERP/CRM) quickly. *** ## Chat Widget Integration (Web SDK) This is an "instant" solution (No-code) that allows you to add AIHive to your website with just a simple HTML code snippet. First, go to the **"AI Setup"** interface, after completing the setup. Click **"Publish"** image.png ### Method 1: Floating Chat Bubble Displays a chat icon in the corner of the screen. Suitable for Landing Pages or homepages. Copy the following code and paste it into the `` or `