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:

When KuBo is started, it scans a file called actions.json. 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 other languages, other genders, 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:

Image depicting the KuBo main menu

The main menu depicted above allows users to select KuBo's three main features:

Physical actions

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:

Image depicting the KuBo submenu with hand actions

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:

Image depicting the KuBo submenu with eye and face actions

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:

Image depicting the KuBo submenu with whisper actions

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:

Image depicting a whispered text in KuBo immediately followed by a response

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".

Custom text

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:

Image depicting the KuBo option to enter custom text, demonstrating how custom text is sent

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:

Image depicting how custom text is received in KuBo

With the custom text option, there is no back button, but the user must enter the command /cancel to return to the main menu instead of sending text:

Image depicting the KuBo option to enter custom text, demonstrating how to cancel the input

It is also possible to tap the highlighted /cancel 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":

Image depicting a conversation in KuBo with several messages, from the perspective of the user 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:

Image depicting a conversation in KuBo with several messages, from the perspective of the user Ann

All messages are tagged with the #kuschel ("cuddle") hashtag. 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 from KuBo.

Source Code

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.)

Obviously, 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 the file that is included in the download.

Copyright © 2021 by Thomas Heller [ˈtoːmas ˈhɛlɐ]