Skip to main content

Blog Post

RAGTime Blog Hero Image

Application Development

RAGTime – A RAG-Powered Bot for Slack and Discord

Enhance your Slack and Discord communities with RAGTime – a RAG-bot from Vectara.


Over the last 12 months, we’ve been hard at work to provide you with many tools you can use to integrate your generative AI enterprise application into your users, including vectara-answer, react-search, react-chatbot, and Create-UI.

Today we are excited to share RAGTime, yet another way to interact with Vectara RAG: an open-source package that enables you to provide a chatbot directly in your Slack or Discord server.

RAGTime is simply a bot that continuously listens to user messages or mentions in either Slack or Discord and responds to their question by sending those questions to your Vectara RAG pipeline.

Key Features of RAGTime

RAGTime is a bot you can add to your Discord or Slack servers, and it can then answer any questions from users by utilizing Vectara’s end-to-end RAG platform.

With RAGTime installed, your users can engage with the bot as follows:

One-to-One Chat with Bot: Engage in private, personalized conversations with the RAGTime bot, ensuring your queries and responses remain confidential.

RAGTime Blog Image 1

Ask Questions by Mentioning Bot Name: Simply mention RAGTime’s bot name in any channel to ask a question and get an immediate response.

RAGTime Blog Image 2

Contextual Chat in Threads: Start a thread with RAGTime to maintain the context of your conversation, allowing for more relevant and detailed answers.

RAGTime Blog Image 3

How does RAGTime Work?

We have provided the source code for RAGTime so you can see exactly how it was built and customize it if needed. 

Let’s see how this works internally.

RAGTime is an automated program that performs various tasks within Slack or Discord. The bot can send messages, respond to user queries, and manage workflows.

The bot listens to specific events such as direct messages or mentions in a Discord of Slack channels, and responds appropriately by leveraging Vectara RAG to craft its response., as shown in Figure 1 below:

RAGTime Blog Image 4

Figure 1: RAGTime messaging flow 

RAGTime includes the following components:

Bot Server: The RAGTime bot is built using Python and SQLite. It’s a simple server that listens and responds to events from either Discord or Slack. SQLite is being used to map Slack or Discord conversation IDs to Vectara Chat conversation IDs, so as to enable full support for conversation history.

The server uses Slack Bolt and to handle events such as direct messages and mentions.

Vectara Query API: to handle a user query, RAGTime sends the query to  Vectara’s Query API, which processes the natural language input and returns precise responses. You can see here how this is implemented, using Vectara’s API.

Using RAGTime

If you want to install RAGTime on your own Discord or Slack server, first sign-up to Vectara if you haven’t done so already, create your corpus, and ingest data into that corpus (you can use Vectara’s indexing API, vectara-ingest, or just upload documents directly through the Vectara console). 

Once your data is in the corpus, you can follow these step-by-step instructions to run the bot on a server (e.g in EC2) and connect it to your Slack or Discord server.

We are testing RAGTime ourselves via a bot we’ve added to our own community Discord server. It is configured to answer questions based on the content of the Vectara website, discussion forums and documentation. Please try it out and let us know if you find any issues.

Check out the following screenshots for more information.

One-to-one chat with bot:

RAGTime Blog Image 5

By mentioning the bot

RAGtime Blog Image 6

What’s Next?:

RAGTime is a Slack and Discord bot demonstrating how easy it is to integrate Vectara’s chat functionality as a bot. We hope you will find it useful for your own use.

We are working on improved functionality for RAGTime, so please let us know what other features you would like to see in the Issues section, and if you have any suggestions for improvements – we would love to hear them as well.

Recommended Content


Get RAGTime Today!

Want to add Vectara RAG to your Slack or Discord server?

Vectara RAGTime
Resource Image
Close Menu