Slide 1

Slide 1 text

A proposal for federated chatbots for distributed information access 37th annual European Simulation and Modelling Conference Fernando Tricas Garc´ ıa [email protected] https://webdiis.unizar.es/~ftricas/ October, 26th, 2023 A proposal for federated chatbots for distributed information access

Slide 2

Slide 2 text

Agenda Introduction The proposal Some lessons, conclussions A proposal for federated chatbots for distributed information access

Slide 3

Slide 3 text

The proposal We would like: ▶ Getting information from several IoT devices (machines, ...) ▶ We will attach a chatbot to each relevant device ▶ No modifications in the original system ▶ Very flexible way of obtaining information A proposal for federated chatbots for distributed information access

Slide 4

Slide 4 text

The proposal We would like: ▶ Getting information from several IoT devices (machines, ...) ▶ We will attach a chatbot to each relevant device ▶ No modifications in the original system ▶ Very flexible way of obtaining information ▶ Chatbots can be a good way to interact with IoT devices. ▶ Sometimes there can be good reasons to have more than one chatbot ▶ Cooperation/coordination is a good property. A proposal for federated chatbots for distributed information access

Slide 5

Slide 5 text

The proposal So, we are proposing: ▶ An architecture for several chatbots ▶ Users interacting with them ▶ Interaction between bots ▶ Requesting actions for other bots ▶ Collecting the replies. ▶ Lightweight, and it can use public infrastructure providing an easy way to start a project with it. A proposal for federated chatbots for distributed information access

Slide 6

Slide 6 text

The architecture A proposal for federated chatbots for distributed information access

Slide 7

Slide 7 text

The architecture ▶ Several computers attached to different machines ▶ Each of them is connected to a communication channel Telegram, Slack, Discord, Gitter, IRC, ... ▶ Users can connect to some of these communication channels (or many). ▶ Adding more information sources =⇒ adding more bots. ▶ It’s up to us select the channels. A proposal for federated chatbots for distributed information access

Slide 8

Slide 8 text

Coordination and Cooperation ErrForward backend ▶ Using Command and Control (C&C) techniques. A proposal for federated chatbots for distributed information access

Slide 9

Slide 9 text

Example A proposal for federated chatbots for distributed information access

Slide 10

Slide 10 text

Bot actions When a bot receives a request from some user it will check if it can fulfil the command: ▶ If it can, it will: 1. Execute the action, 2. Write a message to the user with the reply. A proposal for federated chatbots for distributed information access

Slide 11

Slide 11 text

Bot actions ▶ if not, it will post the command to the common channel and it will wait to see if there is a reply. fw temp A proposal for federated chatbots for distributed information access

Slide 12

Slide 12 text

Bot actions ▶ if not, it will post the command to the common channel and it will wait to see if there is a reply. fw temp A proposal for federated chatbots for distributed information access

Slide 13

Slide 13 text

Bot actions ▶ if not, it will post the command to the common channel and it will wait to see if there is a reply. fw temp ▶ The other bots will read this command and check whether they can execute it or not: 1. Do I know this command? 2. Can I execute this command with these parameters? A proposal for federated chatbots for distributed information access

Slide 14

Slide 14 text

Bot actions ▶ Hopefully, one of them will be able to execute it, so it will: 1. Delete the message requesting the action from the channel. 2. Execute the action. 3. Write a new message in the common channel which embeds the reply. A proposal for federated chatbots for distributed information access

Slide 15

Slide 15 text

Bot actions ▶ Hopefully, one of them will be able to execute it, so it will: 1. Delete the message requesting the action from the channel. 2. Execute the action. 3. Write a new message in the common channel which embeds the reply. A proposal for federated chatbots for distributed information access

Slide 16

Slide 16 text

Bot actions Each one of the other bots, will be able to read (while available) the reply and will check if: ▶ Is this reply for me? Hopefully, one of them will be the originator of the command. It will then: 1. Delete the message with the reply. 2. Write a message to the requesting user with the information. A proposal for federated chatbots for distributed information access

Slide 17

Slide 17 text

We wanted to have a bot, but not to program a bot ErrBot https://errbot.io/ A proposal for federated chatbots for distributed information access

Slide 18

Slide 18 text

errbot ▶ Simple to build upon ▶ Batteries included ▶ Sharing ▶ Community A proposal for federated chatbots for distributed information access

Slide 19

Slide 19 text

errbot ▶ Simple to build upon Extending Errbot and adding your own commands can be done by creating a plugin, . . . ▶ Batteries included ▶ Sharing ▶ Community A proposal for federated chatbots for distributed information access

Slide 20

Slide 20 text

errbot ▶ Simple to build upon ▶ Batteries included Multiple server backends ▶ Sharing ▶ Community A proposal for federated chatbots for distributed information access

Slide 21

Slide 21 text

errbot ▶ Simple to build upon ▶ Batteries included ▶ Sharing ▶ Community ▶ Free Software // Libre Software https://github.com/errbotio/errbot/ A proposal for federated chatbots for distributed information access

Slide 22

Slide 22 text

But it had some limitations A proposal for federated chatbots for distributed information access

Slide 23

Slide 23 text

So we developed a plugin for this Parasitic infrastructure A plugin, using the standard mechanism. https://github.com/fernand0/err-forward ▶ Slack (Proof of concept) A proposal for federated chatbots for distributed information access

Slide 24

Slide 24 text

Some lessons ▶ The interface is important (CLI) ▶ Text based ▶ Commands must be well thought in order to be practical and useful (easy to type, short, meaningful...) ▶ Concurrence issues have been managed ▶ Many of them delegated to the infrastructure A proposal for federated chatbots for distributed information access

Slide 25

Slide 25 text

Conclusions ▶ We can have access to the information from several places (mainly Telegram, IRC) ▶ Easy to manage and to get access to the information (think local, use anywhere) ▶ Scalable Moreover... (not only IoT) ▶ APIs are important to access information. Web scrapping too. A proposal for federated chatbots for distributed information access

Slide 26

Slide 26 text

Any questions, suggestions, ideas, ... [email protected] A proposal for federated chatbots for distributed information access