Prompt
Create a prompt template with dynamic variables ({input}, {human_input}, {context}, {chat_history}, {system_message}).
This is the message from user:
{input}
Automate customer support in LiveAgent with an AI chatbot that answers questions using your internal knowledge base, retrieves relevant documents, and seamlessly hands off to human agents when needed. Improve response speed and customer satisfaction with intelligent inquiry handling.
Receive Customer Chat
Captures incoming chat messages from website visitors in LiveAgent.Prepare AI Prompt
Formats user input and chat history to create a clear prompt for the AI agent.AI Agent Processes Inquiry
The AI agent analyzes the question, searches internal documents and knowledge sources, and determines the best response strategy.Retrieve Answers or Escalate
Pulls information from the internal knowledge base or, if needed, escalates the chat to a human support agent.Respond to Customer
Delivers the AI-generated answer or connects the customer with a human agent in the LiveAgent chat.Below is a complete list of all prompts used in this flow to achieve its functionality. Prompts are the instructions given to the AI model to generate responses or perform actions. They guide the AI in understanding user intent and generating relevant outputs.
Create a prompt template with dynamic variables ({input}, {human_input}, {context}, {chat_history}, {system_message}).
This is the message from user:
{input}
A tool calling agent.
You are an AI language model assistant acting as technical live chat customer support specialist for ***[https://www.YOURWEBSITE.com]*** - ***YOUR_BUSINESS***.
***
<u>**Initial response:**xa0</u>
Conversation may start with automatic pre-chat info (e.g. email, data consent). Start with a greeting, then reply in customer language, offering assistance.
***
<u>**Identify intent and provide answers:**</u>
1. Search for Relevant Content:
- Use Document Retriever tool to find context related to the question.
2. If Relevant Context is Found:
- Use found knowledge sources to provide concise answers with URLs from Document Retriever for more info.
- Provide setup instructions exactly as stated in the referenced URL.
3. If No Relevant Context is Found and Questions are About **YOUR_BUSINESS**:
- Request additional information for unclear queries.
- Focus first on gathering more details, and use Document Retriever again.
- If still unresolved, use the Contact Human Assist tool to transfer the chat to a human support agent. (Ensure the customer speaks ENGLISH for live assistance).
4. For Inquiries NOT related to **YOUR_BUSINESS**:
- Recognize and direct unrelated inquiries to the support team of the mentioned software or business and prevent misuse for inquiries unrelated to **YOUR_BUSINESS**.
***
<u>**Resource Utilization**</u>
* Use "Document Retriever" to search for knowledge relevant to customer question
* Use "Contact Human Assist" tool for transfer valid and relevant communication to Human agent.
* If visitor is asking about pricing of **YOUR_SERVICE**, use URL retriever tool with URL **YOUR-PRICING-PAGE.COM**.
* If customer is asking about recent changes, check **YOUR-PAGE-WITH-RECENT-CHANGES** and **YOUR-PAGE-WITH-NEWS** using URL retriever tool
***
<u>**Formatting:**</u>
* Answer in the conversation's language.
* NEVER USE BULLETPOINTS (not supported yet)
* Use dashes instead of bullet points.
* DO NOT USE MARKDOWN (not supported yet)
* Keep answers in plain text format.
Below is a complete list of all components used in this flow to achieve its functionality. Components are the building blocks of every AI Flow. They allow you to create complex interactions and automate tasks by connecting various functionalities. Each component serves a specific purpose, such as handling user input, processing data, or integrating with external services.
Flow description
This workflow enables a chatbot to automatically handle live chat interactions within the LiveAgent platform. The bot leverages an internal knowledge base and can forward customer inquiries to human agents when necessary. The main objective is to automate customer support, provide instant answers, and scale support operations while ensuring smooth handover to human agents for complex or unresolved issues.
The flow processes incoming chat messages, retrieves context from the conversation history, searches internal documentation, and outputs responses. If the chatbot cannot resolve a query, it can escalate the chat to a real human agent using LiveAgent integration.
Component Name | Role/Function |
---|---|
Chat Input | Receives incoming user messages from the chat interface. |
Chat History | Retrieves recent chat history to provide context for responses. |
Prompt Template | Formats the incoming message and context into a prompt for the chatbot agent. |
Document Retriever | Searches internal documentation and knowledge bases for relevant answers. |
URL Retriever | Fetches and parses external web pages or documentation based on URLs for up-to-date answers. |
LiveAgent Human Assist Tool | Enables escalation to a human support agent via LiveAgent when required. |
Tool Calling Agent | The main chatbot “brain” that orchestrates document retrieval, response generation, and escalation logic. |
Chat Output | Displays the chatbot’s reply in the chat interface. |
Note Widget | Provides setup instructions for administrators to customize the chatbot for their business. |
User Message Intake: The workflow begins with the Chat Input node, which captures each new message from the user.
Context Gathering: Simultaneously, the Chat History node retrieves recent conversation history (up to 10 messages) to ensure context-aware responses.
Prompt Construction: The Prompt Template node dynamically composes a prompt by inserting the user’s message and context, preparing it for processing by the chatbot agent.
Knowledge Search:
Tool Orchestration & Response Generation:
Output: The final response, whether an automated answer or a message indicating escalation to a human, is displayed via the Chat Output node.
Setup Instructions: The Note Widget provides guidance for administrators to personalize the chatbot’s configuration for their organization. This includes updating the system message with the correct business name, website, and other key details.
Escalation Logic: If the chatbot cannot find a relevant answer or the inquiry is ambiguous or complex, it prompts the user for more information. If unresolved, it offers to connect the user with a human agent through LiveAgent.
Step | Action |
---|---|
Incoming message | Captured by Chat Input |
Gather chat history | Retrieves up to 10 previous messages |
Prepare prompt | User message + context formatted by Prompt Template |
Search knowledge sources | Document Retriever and URL Retriever tools engaged as needed |
Generate response | Tool Calling Agent crafts a response, using tools and context |
Escalate if needed | Unresolved/complex queries are forwarded to a human agent via LiveAgent integration |
Display reply | Final message shown to the user through Chat Output |
This workflow automates and streamlines customer support in LiveAgent by combining AI-powered conversation, internal knowledge search, and seamless human handoff. It is highly configurable, scalable, and designed to boost efficiency, consistency, and customer satisfaction in live chat environments.
We help companies like yours to develop smart chatbots, MCP Servers, AI tools or other types of AI automation to replace human in repetitive tasks in your organization.