KuBo: Communicating Touch Over Distance
A chatbot for tactile communication built with Telegram
by Thomas Heller
KuBo (short for Kuschelbot, German for "cuddle bot") was a chatbot built with the mobile messaging app Telegram in 2020. With the COVID-19 pandemic happening in the same year, involuntary physical distancing suddenly became a concern for many people, on a global scale. But there are many other reasons for the impossibility to express physical touch: other health conditions or simply the increasing number of long-distance relationships (LDRs).
KuBo is designed as a secondary communication channel that supplements tactile information in addition to an existing verbal or textual communication channel. From a technical point of view, one KuBo instance allows exactly two participants to exchange information, but this concept could easily be extended. KuBo is currently not actively maintained, but you can download the experimental source code at the end if you want to study or experiment with it further.
A quick overview of the technology used for the project:
- The messaging app Telegram to provide a chat-based user interface. Telegram, at the time, provided a very nice programming interface (API) for chatbot development, compared to other messaging services. The obvious downside was that all data was being processed through third-party servers.
- A backend service written in Google's Go programming language, doing the actual chat processing. Go has fast compile times and is easy to deploy because it doesn't require any external dependencies. Go being a strongly typed language made it easy to catch bugs early in development.
- A Raspberry Pi with Raspberry Pi OS to run the backend service 24/7. KuBo would run on any Linux-based server, or on a laptop/PC for development and testing. As Go is available for Mac and Windows as well, the source code should probably compile there, too, but this has not been tested.
When KuBo is started,
it scans a file called
This file contains all available actions
in a simple JSON-based format.
The sample file included provides
actions in German for a male and female participant,
but you can easily modify the file to support
and completely novel actions.
To make KuBo as easy to use as possible, it provides a touch screen menu, which allows its users to select the desired options with a single tap:
The main menu depicted above allows users to select KuBo's three main features:
- The primary feature of KuBo is the physical action communication, which is activated by choosing the body part that carries out the action, and then a specific manner in which the action is carried out (more on that below).
- Even though this is not strictly related to touch, KuBo also supports "whispering" text, as it can be as intimate as physical touch. Providing the whispering feature removes the need to switch back to another communication channel, and makes communication go more smoothly.
- Finally, KuBo cannot provide a predefined action for every conceivable situation, hence the custom text feature exists, which allows users to write a custom text, but within the KuBo communication channel, to make clear that it is supposed to be taken literally as a physical action; again removing the need to switch back to another communication channel.
In most cases when selecting a physical action, a second menu will show up that allows for selecting a body part of the partner, and sometimes a more specific manner in which the action will be carried out:
The above image shows the submenu for hand actions which includes options for caressing the partner's hand, arm, back etc., but also a few special options like holding hands.
Some submenus work a bit differently, such as the submenu for eye actions which allows for communicating looking at the partner, which includes communicating facial expressions:
In any case, the submenus provide a "back" button that leads back to the main menu.
When selecting the whispering submenu, a handful of predefined sentences show up which can be "whispered" (sent as text) to the partner with a single tap:
The "whispered" text will be sent via KuBo instead of the regular communication channel, to provide the same sense of intimacy that the KuBo's other actions convey.
Once a sentence has been whispered, an additional button shows up in the receiver's whispering submenu. The exact text depends on the message received: It allows the receiver to send the same message back to the sender, but the grammar will be adjusted depending on the text received:
To give an example in English: If someone would receive "I love you", KuBo would be configured to respond with "Me too". If someone would receive "Sleep well", KuBo would in turn be configured to respond with "You too".
Using the custom text option, any text can be sent via KuBo. Choosing this option does not open a submenu, but instead waits for the user to enter text using the keyboard:
The custom text will be delivered via KuBo, along with a "handwritten" icon to make it clear to the receiver that it is a custom text:
With the custom text option, there is no back button,
but the user must enter the command
to return to the main menu instead of sending text:
It is also possible to tap the highlighted
text in KuBo's message,
which has the same effect as entering the command manually.
The following two images depict a sample conversation between the two users "Ann" and "Bob":
As you can see from the image above, the menu is moved downwards whenever the Bob selects an option. This makes it easy to read the previous messages in the conversation, without multiple menus cluttering the chat window.
The following image depicts the same conversation from Ann's perspective:
All messages are tagged with the
By tapping any of the hashtags,
users can view the whole conversation history
without the bot's system messages
(last menu, custom text prompts etc.).
It also makes it easier to recognize new message notifications
You can download the Go source code of KuBo here under the AGPL license. (In short, this license allows you to use the program free of charge, but if you make it available as a service for other people, you must publish its source code including all changes that you may have made.)
both participants require a Telegram account,
and the person setting up the bot will have to
create a chatbot token with Telegram.
You can find more detailed setup instructions in
README.md file that is included in the download.
Copyright © 2021 by Thomas Heller [ˈtoːmas ˈhɛlɐ]