AI Chatbot with FreshChat & Knowledge Base Support

Deploy a smart AI chatbot that integrates seamlessly with FreshChat. The chatbot answers user inquiries using your internal knowledge base and intelligently forwards complex or unresolved questions to a human support agent via FreshChat, ensuring customers always get the help they need.

How the AI Flow works - AI Chatbot with FreshChat & Knowledge Base Support

Flows

How the AI Flow works

Chat Session Initiation.
Detects when a user opens a chat and sends a welcome message, introducing the AI chatbot and FreshChat support.
User Message Collection.
Collects chat messages from the user and maintains chat history for context.
Knowledge Base Search.
Uses AI agent to search the internal knowledge base for relevant answers to the user's inquiry.
Automated & Human Assistance.
If the AI cannot answer, forwards the inquiry to a human support agent via FreshChat for personalized help.
Response Delivery.
Delivers responses from either the AI or human agent back to the user in the chat interface.

Prompts used in this flow

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.

Welcome Message

Displays a welcome message to users when the FreshChat chatbot is opened.

                Here’s a welcome message for your FreshChat-integrated chatbot:

👋 Welcome to the FreshChat Support Bot!
I’m here to assist you with your inquiries using our internal knowledge base 🧠. If I can’t find the answer you need, I’ll seamlessly forward your question to a real agent via FreshChat for personalized support.

Feel free to ask me anything—let’s get started! ✨💬

            

Tool Calling Agent System Prompt

System prompt that instructs the AI assistant on how to act as a technical live chat support agent, including when to greet, search, escalate, and language beha...

                You are an AI language model assistant acting as technical live chat customer support specialist for [YOUR BUSINESS] -[DESCRIPTION OF YOUR BUSINESS]
If conversation starts with a greeting, respond with a greeting in same language and ask how you can assist and if they have any question about our our software or it's features.
Search content relevant to question of user by connecting to DocumentRetriever. 
If you don't find any relevant evidence in context found with DocumentRetriever and ONLY IF QUESTIONS ARE RELATED TO OUR software:
- In case question was in English language, always prompt the user to connect him/her to a real agent.
- In case question in different language, first ask if visitor speaks English and be interested t be connected with English speaking support agent, and only in case of confirmation, prompt the user to connect him/her to a real agent. 
FOR UNCLEAR QUESTIONS ask for more information.

ANSWER IN THE SAME LANGUAGE as defined in Current session chat data

            

Components used in this flow

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.

Chat Opened Trigger

The Chat Opened Trigger component detects when a chat session starts, enabling workflows to respond instantly as soon as a user opens the chat. It initiates flows with the initial chat message, making it essential for building responsive, interactive chatbots.

Message Widget

The Message Widget component displays custom messages within your workflow. Ideal for welcoming users, providing instructions, or showing any important information, it supports Markdown formatting and can be set to appear only once per session.

Chat Output

Discover the Chat Output component in FlowHunt—finalize chatbot responses with flexible, multi-part outputs. Essential for seamless flow completion and creating advanced, interactive AI chatbots.

ChatInput

The Chat Input component in FlowHunt initiates user interactions by capturing messages from the Playground. It serves as the starting point for flows, enabling the workflow to process both text and file-based inputs.

Tool Calling Agent

Explore the Tool Calling Agent in FlowHunt—an advanced workflow component that enables AI agents to intelligently select and use external tools to answer complex queries. Perfect for building smart AI solutions that require dynamic tool usage, iterative reasoning, and integration with multiple resources.

Document Retriever

FlowHunt's Document Retriever enhances AI accuracy by connecting generative models to your own up-to-date documents and URLs, ensuring reliable and relevant answers using Retrieval-Augmented Generation (RAG).

Freshchat integration

FlowHunt integrates with all the leading customer service solutions, including Freshchat! Seamlessly transition from AI chatbot to human support with easy Freshchat integration.

Chat History Component

The Chat History component in FlowHunt enables chatbots to remember previous messages, ensuring coherent conversations and improved customer experience while optimizing memory and token usage.

Flow description

Purpose and benefits

Workflow Overview: Chatbot With FreshChat Integration

This workflow enables a customer support chatbot that is tightly integrated with FreshChat. It is designed to automatically answer user queries using your business’s internal knowledge base, and if needed, seamlessly escalate conversations to a human support agent via FreshChat. The flow provides a scalable and automated way to handle routine inquiries, ensuring users get instant help, while also allowing for smooth handover to live agents for complex or unresolved issues.


Step-by-Step Workflow Description

1. Chat Initialization and Welcome Message

  • Trigger: When a user opens the chat, the ChatOpenedTrigger node activates.
  • Response: The flow immediately sends a friendly welcome message using the MessageWidget, which is displayed via the ChatOutput. The message introduces the AI support bot, explains its capabilities, and reassures users that a human agent is available if needed.

2. User Input Handling

  • Input Collection: The ChatInput node captures messages or file uploads from users.
  • Chat History: The ChatHistory node maintains the conversation context, which helps the AI provide coherent and relevant responses.
  • Document Retrieval: The DocumentRetriever node is used to search the internal knowledge base for information relevant to the user’s question.
  • Tool Calling Agent: The core logic is managed by the ToolCallingAgent node, which:
    • Receives the user’s message, chat history, and results from the document retriever.
    • Uses a system prompt to ensure the AI acts as a technical support specialist for your specific business.
    • Answers in the same language as the user, greets appropriately, and refers to internal documentation to answer questions.

4. Human Escalation Logic

  • If the AI cannot find a satisfactory answer in the knowledge base:
    • For English queries: The bot prompts the user to connect with a real agent.
    • For non-English queries: The bot first asks if the user is willing to be connected with an English-speaking agent. If confirmed, it offers the handover.
  • This escalation mechanism is powered by the FreshChatHumanAssistToolComponent, which integrates with FreshChat to transition the conversation to a human agent.

5. Response Display

  • All responses from the AI or escalation messages are output to the chat interface using the ChatOutput node, ensuring a smooth and interactive user experience.

Components and Their Roles

Node NameFunction
ChatOpenedTriggerDetects when a user opens the chat.
MessageWidgetDisplays the welcome message.
ChatOutputShows messages to the user.
ChatInputCollects user input and file uploads.
ChatHistoryStores and retrieves the chat conversation history.
DocumentRetrieverSearches internal knowledge sources for answers.
ToolCallingAgentOrchestrates responses, chooses between answering or escalating to a human.
FreshChatHumanAssistToolIntegrates with FreshChat for handover to human agents.

Why This Workflow Is Useful

  • Scalability: Automates the majority of support queries, reducing the load on human agents.
  • Consistency: Ensures users receive accurate information sourced from your internal knowledge base.
  • 24/7 Support: Provides instant answers at any time, improving customer satisfaction.
  • Seamless Human Escalation: Ensures customers can always reach a real person when needed, without friction.
  • Multilingual Support: Detects user language and adapts both responses and escalation offers accordingly.
  • Improved Efficiency: Human agents only handle questions that the AI cannot resolve, letting your team focus on complex issues.

Ideal Use Cases

  • Businesses seeking to automate technical and product support using AI.
  • Scenarios where instant, consistent responses are needed with the option for human escalation.
  • Companies using FreshChat who want to blend automation with live support for optimal customer experience.

In summary, this workflow provides a robust, automated customer support solution that leverages your internal knowledge base and FreshChat integration, making support operations more efficient, scalable, and user-friendly.

Let us build your own AI Team

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.

Learn more

AI Chatbot with Slack Human Escalation
AI Chatbot with Slack Human Escalation

AI Chatbot with Slack Human Escalation

Deploy a smart customer support chatbot for LiveAgent that automatically answers visitor questions, retrieves knowledge base documents, and escalates to a human...

4 min read
AI Support Chatbot with LiveAgent Integration
AI Support Chatbot with LiveAgent Integration

AI Support Chatbot with LiveAgent Integration

Automate your customer support with an AI chatbot that answers questions using your internal knowledge base and seamlessly connects users to a human agent via L...

4 min read
AI Chat Assistant with Conversation Memory
AI Chat Assistant with Conversation Memory

AI Chat Assistant with Conversation Memory

A simple AI chat assistant workflow that leverages previous conversation history to generate relevant responses to user input. Includes a welcome message and us...

3 min read