In this post, I will guide you through the process of building an AI customer service agent that not only answers customer queries but also updates itself automatically by pulling the latest information from your company’s knowledge base. This agent can escalate issues by creating support tickets, ensuring that your customer service remains efficient and effective.
One of the key advantages of AI customer service agents is their ability to access and process vast amounts of information quickly. This enables them to provide accurate and relevant responses to customer inquiries, significantly reducing wait times and improving the overall customer experience. Furthermore, these agents can operate 24/7, ensuring that assistance is always available, regardless of the time of day.
In addition to answering questions, AI customer service agents can also perform tasks such as creating support tickets, tracking customer interactions, and providing insights into customer behaviour. This not only streamlines the support process but also allows human agents to focus on more complex issues that require personal attention.
Setting Up Flowise and OpenAI Assistant
To create an effective AI customer service agent, I utilised Flowise and OpenAI’s assistant. Flowise is a no-code/low-code platform that simplifies the process of building and deploying conversational agents. It provides a user-friendly interface, allowing users to create chat flows with minimal technical expertise.
To get started, I first set up a new chat flow in Flowise. This involved creating a blank canvas where I could design the interactions for my customer service agent. I named the flow “Customer Support Agent” and integrated OpenAI’s assistant, which is essential for processing natural language queries.

After setting up the chat flow, I configured the OpenAI assistant by entering my API key and selecting the appropriate model. For this project, I opted for the GPT-4 model due to its advanced reasoning capabilities, which are crucial for providing accurate responses to customer inquiries.
Next, I specified the assistant’s instructions to ensure it understood its role. I instructed it to act as a customer support agent for a fictitious mobile telecom provider named Fusion, highlighting the importance of delivering friendly, helpful, and comprehensive assistance.

Integrating Additional Features
To enhance the functionality of the customer service agent, I integrated a vector store for retrieval-augmented generation. This allows the assistant to access and provide information from a database of frequently asked questions (FAQs), ensuring that responses are always up-to-date and relevant.
With the initial setup complete, I tested the agent to verify its response capabilities. At this stage, the assistant did not have any company-specific information, so it provided generic responses. This was an expected outcome, as I had yet to populate the vector store with relevant data.

Creating the Web Crawling Scenario
To ensure that the customer service agent has access to the latest information, I created a web crawling scenario using Make.com. This platform allows for the automation of various tasks, including web scraping, which is essential for keeping the knowledge base current.
The first step in this process was to set variables for the website URL I wanted to crawl. In this case, I used the URL of the Fusion help centre. I also integrated a service called Fir Crawl, which is designed to produce LLM-ready data from web pages. This ensures that the information extracted is clean and easily interpretable by the OpenAI assistant.

Executing the Crawl
After configuring the crawling scenario, I initiated the crawl to extract data from the help centre. The crawling process typically takes around 18 seconds to complete, during which the system scrapes the specified pages and compiles the data in a markdown format.
Once the crawl was finished, I reviewed the results. The output included the markdown for each scraped page, which I would later upload to the OpenAI assistant. This step is crucial, as it enables the assistant to provide accurate responses based on the latest information available on the website.

Handling Updates to Files
As information on the website changes, it’s essential to update the files associated with the OpenAI assistant. To manage this effectively, I implemented a tracking system using Airtable. This allows me to monitor which files have been uploaded and track changes over time.
The Airtable structure includes three key fields: the OpenAI file ID, the URL of the crawled page, and a unique hash that serves as a fingerprint for the content. This unique hash is generated using an encryption algorithm, ensuring that any changes to the page content will result in a different hash value.

When I crawl the website, the system checks if the URL already exists in Airtable. If it does, it compares the unique hashes to determine if the content has changed. If a change is detected, the old file is deleted from OpenAI’s platform, and the new file is uploaded, ensuring that the assistant always has access to the most current information.
This automated process streamlines the management of the knowledge base, reducing the need for manual updates and ensuring that customers receive accurate and timely information.

By implementing these systems, I have created a robust and efficient AI customer service agent capable of providing accurate information and support to users while continuously updating itself with the latest data from the company’s knowledge base.
Setting Up Support Ticket Creation Flow
To enhance the capabilities of the AI customer service agent, I established a support ticket creation flow. This feature allows the agent to escalate issues that require human intervention, ensuring that customer concerns are addressed promptly and effectively.
The first step in this process was to define the criteria for when a support ticket should be created. I focused on common issues that typically require additional assistance, such as account-related queries or technical problems that the AI agent cannot resolve autonomously.

Next, I configured the Flowise platform to handle these escalations. I created a specific node in the chat flow that triggers when the AI agent encounters a question it cannot answer. This node collects relevant information from the customer, such as their contact details and a description of the issue.
This information is crucial, as it not only allows the support team to understand the customer’s concern better but also ensures a smoother transition from AI to human support. Furthermore, I integrated an automated response that acknowledges the customer’s request and informs them that a support ticket has been created.

Once the support ticket is generated, it is sent to a designated support channel, where a human agent can review and respond. This integration streamlines the support process, allowing for efficient handling of customer queries that require a personal touch.
Testing the AI Agent
With the support ticket creation flow in place, I proceeded to test the AI agent’s overall functionality. This involved simulating various customer interactions to ensure that the agent could respond accurately and escalate issues appropriately.
I began the testing process by initiating common queries that customers might have. The goal was to assess the agent’s ability to provide accurate information while also triggering the support ticket system when necessary.

During these tests, I monitored the AI agent’s responses closely. I noted the scenarios in which it successfully answered questions and those where it needed to escalate the issue. This feedback was invaluable for fine-tuning the assistant’s response capabilities and ensuring that the support ticket creation flow worked seamlessly.
Additionally, I encouraged team members to participate in the testing phase. Their varied perspectives helped identify areas for improvement and provided insights into how real customers might interact with the AI agent.

Integrating Firecrawl for Continuous Updates
To maintain the accuracy of the information provided by the AI agent, I integrated Firecrawl into the system. This service plays a crucial role in continuously updating the knowledge base by automating web crawling tasks.
Firecrawl is designed to scrape websites and extract relevant data, which can then be formatted for use in AI applications. By integrating this tool, I ensured that the AI customer service agent has access to the latest information from the company’s website without manual intervention.

The integration process involved configuring the crawling parameters, such as the frequency of data extraction and the specific pages to be crawled. I opted for a weekly schedule to ensure that the knowledge base remained current while balancing server load and performance.
Once the integration was complete, I tested the system by initiating a crawl. The results were promising, as Firecrawl successfully extracted the latest FAQs and updates from the website, which were then uploaded to the AI agent’s knowledge base.

Creating an Airtable Structure for Data Management
To effectively manage the data collected from the web crawling process, I established an Airtable structure. This database serves as a central repository for all the information extracted from the website, making it easy to track updates and changes.
The Airtable structure includes several key fields, such as the content type, the date of the last update, and any relevant metadata. This information is crucial for maintaining an organised and efficient system.

I also implemented a tagging system within Airtable, allowing for easy categorisation of data. This feature enables the AI agent to retrieve specific information quickly, improving response times and accuracy.
As part of the data management process, I scheduled regular reviews of the Airtable entries. This ensures that any outdated information is flagged and updated promptly, further enhancing the reliability of the AI customer service agent.

By creating a robust Airtable structure, I have laid the groundwork for effective data management that supports the AI agent in delivering accurate and timely responses to customer inquiries.
Setting Up the Incremental Update System
To ensure that my AI customer service agent remains up-to-date, I implemented an incremental update system. This system automatically checks for changes on the website and updates the knowledge base accordingly, allowing the agent to provide accurate information to users.
First, I created a module that verifies whether the URL of a specific webpage is already in the Airtable database. If it exists, the module checks the unique hash of the content to determine if it has changed. The hash serves as a fingerprint for the content, ensuring that even minor updates trigger a refresh of the data.

If the URL exists but the hash does not match, it indicates that the content has changed. The next step is to delete the old file from OpenAI’s system, ensuring that outdated information isn’t served to customers. This is achieved by using an API call to delete the previous record.

Once the old file is removed, I upload the new content to OpenAI. This process involves creating a new file and reattaching it to the vector store, ensuring the AI agent can access the latest information. The Airtable record is then updated with the new file ID and hash, maintaining an accurate record of all uploaded content.

This incremental update system is designed to run on a scheduled basis, ensuring that the AI assistant maintains an up-to-date view of the knowledge base. With this setup, customers can receive the most current responses without any manual intervention required on my part.
Finalizing the Support Ticket Flow
To enhance the functionality of the AI customer service agent, I finalised the support ticket flow. This allows the agent to create support tickets when customer queries cannot be resolved automatically. I established criteria for when a support ticket should be generated, focusing on common issues that require human intervention.
In Flowise, I created a specific node that triggers the support ticket creation process when the AI agent encounters a question it cannot answer. This node collects essential information from the customer, such as their name, email address, phone number, and a description of the issue. This information is crucial for human agents to understand and resolve the customer’s concerns effectively.

Once the necessary information is collected, the support ticket is automatically sent to a designated support channel. This integration streamlines the support process, allowing human agents to respond swiftly and efficiently to customer needs. The automated response acknowledges the customer’s request, ensuring they feel supported throughout the process.

Embedding the Chatbot into Your Website
To make the AI customer service agent accessible to users, I embedded it into the Fusion website. This integration allows customers to engage with the chatbot directly, facilitating immediate assistance with their inquiries.
The embedding process involves copying a simple script into the HTML of the website. This script creates a popup that users can interact with, providing them with a seamless experience. I opted for a popup version for its ease of use, allowing customers to access support without navigating away from their current page.

After adding the script to the website, I tested the integration by asking common questions about service plans. The chatbot responded accurately, demonstrating its ability to provide up-to-date information drawn from the latest knowledge base updates.

Â