AI Hub
UChat has introduced its powerful AI Agents feature, making it easier than ever to build AI-enabled chatbots without the complexity of handling chat completions and AI assistants manually.
With AI Agents, users can now create advanced, conversational AI bots that seamlessly integrate with OpenAI (and all other popular GenAI platforms), execute tasks independently, and provide dynamic, human-like interactions—all with minimal effort.
Whether for customer support, lead generation, or workflow automation, UChat’s AI Agents remove the barriers to AI-powered chatbot development, simplifying the process for businesses and developers alike
Template appointment booking AI agent created during the workshop recording can be found here.
Accessing AI Agents and AI Functions
Inside your bot, click on “AI Hub” from the left toolbar to access AI agents and functions.
Creating AI Agent
Click on “+ AI Agent” to create a new AI Agent.
Name & Description:
In this section you will have to enter the name and description of the AI agent. The description will be a brief text that provides enough context on what will be the function of the AI Agent going to be.
Sample Description: This agent is in charge of scheduling appointments with users. The agent needs first to capture the user details which are first name, last name and email. In the next the agent needs to fetch available timeslots and from there let the user choose among them. Once the date and time have been chosen the agent needs to book the appointment |
Settings
In this section you will decide which model (and platform) you want to choose and what will be the various parameters that will be modifying the behaviour of the agent created.
Note: If your usecase requires the AI Agent to employ functions, then its always better to use higher models like gpt-4-turbo-preview as higher models are more stable and accurate when using functions.
UChat currently support OpenAI, Deepseek and Grok AI for creating agents. More model will be added soon. including Google Gemini, and Claude.
In this section you can also modifying the various parameters such as temperature value and no of repetitions to further modify the agent’s behaviour
The "Number of chat messages before auto summarize" feature helps manage long conversations by automatically condensing chat history after a set number of messages.
Once the conversation reaches the specified limit (e.g., 10, 50, or 100 messages), the system creates a concise summary of those interactions and reinserts it into the chat as a single entry.
This process preserves key details while significantly reducing character space usage, allowing for more efficient memory management. By summarizing past exchanges, the AI can retain important context without overwhelming the chat history, ensuring smoother interactions.
Additionally, users can customize the maximum token limit for summaries, with 500 tokens being sufficient for general text-based chats and 1,000 tokens recommended for complex tasks like appointment booking. This feature enhances AI performance, conversation clarity, and long-term engagement efficiency.
At the end you can also select the preferred output either in text or in JSON:
AI Agent Advanced Mode
When Advanced Mode is enabled, the AI agent does not reply to the user directly. Instead, it stores the response in the system field “Last AI Agent Reply”. You must select a workflow to process and handle the response before sending it to the user.
Key Features
Response Formatting: Modify AI replies by breaking down long responses into multiple sections for better readability.
Media Integration: Add relevant media files (images, videos, or attachments) to enhance responses.
Workflow Automation: Process AI-generated content through custom workflows to improve message delivery and presentation.
Note: When Advanced Mode is enabled, the Auto Suggestions feature will be disabled.
Agent Prompt
In this section you will define the persona (or how you want the AI agent to behave) as well as its role (or any impersonation) you want it to adhere to.
Sample Role: The Appointment Booking Agent is responsible for scheduling appointments with users. This agent must capture user details, such as first name, last name, and email, fetch available timeslots, allow the user to select their preferred time, and finalize the appointment booking process. The tone should be professional and friendly, ensuring a smooth and positive user experience throughout the scheduling process. |
In the skills section, you will have to define all the features you want your AI Agent to perform, whether it be collecting user info data or taking timeslots for appointment booking, everything needs to be defined here. In the skill section, you will also receive insight over which functions you will need to set for your objectives and goals.
Sample Skill: ## Skills ### Skill 1: User Detail Capture ### Skill 2: Timeslot Selection ### Skill 3: Appointment Booking |
The Product & Service Information feature lets you input detailed descriptions of your products and services, including specifications, booking options, pricing details, and helpful references.
This ensures users can easily access relevant information without needing to ask repeatedly. By providing structured data, this feature helps streamline interactions, improve customer engagement, and enhance the overall user experience.
In the constraints section, you will have to define the behaviours you DONT want your AI to perform. This can include certain questions you dont want to have AI ask or certain words you dont want the agent to use.
Sample Constraints: The agent must only process requests in a single user session and should not store personal data beyond the session. Ensure that all prompts and responses are clear and user-friendly. Handle errors in data input gracefully, providing clear guidance on how to correct mistakes (e.g., invalid email format). If at any step the user decides to cancel, offer an option to exit the booking process politely. Response times should be quick to maintain user engagement and satisfaction. |
For your ease, UChat has provided “Generate Agent Prompt” button, which generates the role, persona, skills, and constraints sections based on your given description.
There are two main scenarios where this feature is especially useful. First, if you lack experience in prompt writing, it helps you quickly structure a detailed and effective prompt without needing advanced skills.
Second, if you prefer not to start from scratch, this tool provides a predefined framework, giving you a solid foundation that you can modify and tailor to fit your specific requirements.
Creating AI Functions
Click on “+ AI Function” to create a new AI Function
In the first section you will have to define the name and description of the function.
Sample Description: This function needs to capture user details which are: first name, last name and email. For email the agent needs to validate proper formatting in case the user is not providing it |
In the next section , you will have to define the complete prompt for the function (i.e what you want the function to do or perform)
Sample Prompt:
### Skill: capture_user_details #### Steps for Execution: #### Constraints: #### Formatting Rules: #### Error Handling: #### Conditions: |
In the next section, you will have to define the values you want to fetch from the function (like first name, last name etc) and describe them, as well as to choose which CUF you want them to be saved.
Note: Make sure you check the “Required” check to make the value a must for the function to collect. You can also check “Memory” feature which will go over the conversation history to check if the value already exists. if it does it will skip asking for it again and move on to the next parameter.
At last, you will have to attach the flow (only workflows allowed) that needs to be triggered when the function is called
You can use this feature to send captured values to another platform through native integrations (like googlesheets) or perform API calls via external requests node. It can also retrieve information from an external source and pass it back to the AI agent, allowing the conversation to continue smoothly.
This makes it easy to automate tasks, update information in real-time, and enhance AI responses with the latest data.
Note: You can now use “Send Message” nodes inside workflows. This is done to let AI Agents send media and other dynamic content as per the information received
Selecting the AI Function
For AI Agents to be able to use AI functions, you will have to select them inside the AI Agents modifications.
Once selected, it will look something like this (with an overview of the function prompt)
Note: When deselecting/selecting a function, its prompt will appear/disappear accordingly from the overlay
Using AI Functions
(You can only use AI Functions in workflows). You can select the AI Function Output node from the AI Agents tab in the action block. This will be the data you will feed back into your AI Agent after a function is called and a workflow is processed.
Using AI Agent
Create an action node and select “AI Action:”
Click on Edit Action to select the AI Agent
Select the primary AI Agent (the agent which will trigger and fulfill first) as well as secondary agents (if needed). You can also select the inactivity timeout for the user, that if user stops replying in between conversation with an AI agent, this timeout will trigger and you can follow-up with the users to interact with bot again.
When you select secondary agents, the primary agent will inherit any functions from those secondary agents. However, the primary AI agent’s persona & Role settings & LLM setting will be inherit to the secondary agent.
This feature is particularly useful when you want to enhance the primary agent with additional capabilities without altering its core functionality. By integrating secondary agents, you can expand the range of tasks the primary agent can handle while maintaining a consistent interaction flow(persona & role setting & LLM settings).
At last, save the information in the CUF of your choice. This step is optional, and is designed for debug service only.
If you don’t save the output to any user custom field, the bot response will still send out automatically.
In order to use this AI Agent, all you have to do is send the flow to the user and AI Agent will start conversing with the user.
You can also chain multiple AI Agents(Additional AI agents) together to route the user as per your need. Additional agent will be send the title and short description in the system prompt. Once the intent is identified with additional agent, and then you can connect this intent with another AI agent action.
This will make sure your bot can cover maximum user case, while maintain a optimize usage of your prompt token.
The complete conversation with the user will be saved in the new System JSON field called AI Messages:
AI Agent Incomplete Timeout
Input Incomplete Timeout allows the AI agent to wait for a set period of seconds to capture all responses from the user and process them as a single response. This ensures that the AI agent processes complete user input before generating a reply.
Note: Every new input restarts the timer. For example, if the timeout is set to 10 seconds and the user types “hi,” the countdown begins. If they send another message, like “how are you,” after 6 seconds, the timer resets back to 10 seconds instead of continuing from 7.
Creating AI Tasks
From the AI Hub, click on AI Tasks and then press “+AI Task”.
In the first section, you will have to define the name and the prompt for what you want the AI task to do. AI Tasks are essentially small a combination of chat completions packaged into a bundle which are designed to perform single tasks.
You can use one of the presets available to get an idea of how to fill in the prompt.
In the settings section you can define the settings for model as well as other parameters such as temperature and max tokens
In the output field section, if your AI Tasks requires an output (i.e you are extracting a certain information from a larger text) then you can set a output field where the result will be saved into a CUF.
An example output will look similar to this:
Using AI Tasks
In the action block, click on AI Actions and then select AI Tasks from the dropdown.
Select the AI Task you want to perform and then in the input field, enter the content on which you want to perform the AI Task on,
The end result will look like this:
This value can then be mapped to a user-field to further use it in other flows.
Troubleshooting AI
There are mainly two ways you can go about for troubleshooting the AI responses. The first way way is to analyze the “AI Messages” System JSON field.
You can go to the bot user overview and click on the AI Message JSON to analyze at which step what the user is asking and what responses are being generated by AI.
You can also study when a function is being called:
The second method is to directly analyze the whole conversation from Livechat (with system messages enabled)
Here you can see which AI Agent is being utilized in the flow:
You can also see when a function is being called
Hovering over this reveals the arguments and outputs processed by this function
Similarly you can also see when user fields are being filled.