AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Communication between two bots
 
 

Use a bot to call other bot to enter into conversation with the user. I do not know if it is possible with chatscript, if so, I would like to experiment. thank you

 

 
  [ # 1 ]

Piggy backing on this question…
Bruce, you’ve asked me about new features and I think it would be nice for there to be a nice simple way to talk to another CS server.
e.g. $_response = ^csopen($_addr $_port $_bot $_msg)


Fréjus, it is possible to have several bots compiled together and then switch between them, but I’ve always found this to be a bit cumbersome. Especially as the number of bots grows.

Personally I like bots in distinct server instances but there is no straightforward way at the moment to talk to them from another CS instance, but you do have options.
1. You can front your CS server with a http API (eg. in node,js) that converts the incoming request into CS protocol (which is simple but not http compatible).
2. Write your own private CS function that makes the request to the remote CS server.

 

 
  [ # 2 ]

You would probably have to have two running ChatScript servers, each running on different ports, and some sort of “bridge” to handle communications between them. Such a bridge would have to not only direct communications between the two CS servers, it would also be responsible for displaying the conversation. It shouldn’t be difficult to write such a bridge script. In fact, I could write one in a few different programming languages, but time would be required, and that’s not in great supply, at present.

 

 
  [ # 3 ]

yes, I’d opt for Andy’s option 1, as Dave proposes too.

i’ts’ matter to implement a sort of CS messages router (the “bridge”) for two or more running CS servers connected by that router… smile
This router must redirect incoming CS requests (TCP messages) from a source bot, to correct destination bot, having a sort of “DNS” look-up table:

# bot name : ipaddress:port
giorgioBot : 138.8.8.1:1024
paolaBot : 258.178.89.2:1024
CRMBot : localhost:1025

I have to deepen the concept.


BTW, maybe interesting for reader: https://www.interbot.cc/

 

 
  [ # 4 ]
users
      
^
      |
      | 
input port at addresslocalhost:2001
      v
.----------------------------------------. inbound
bot router/hub                         |
.----------------------------------------. 
outbound
      
^         ^         ^
      |         |   ...   |          
      
v         v         v
     bot1      bot2      botN 


having the look-up table as configuration file (I called “DNS”, let say a sot of “hosts” file),

the router pseudocode could be something like:

# 1. inbound thread, from users port
if ( port destination bot name is IN the DNS  table ) then 
   forward message to that name 
(a previously open tcp connection)
end

# 2. outbound thread, to bots

for each bot port connection
    
if (port destination bot name is IN the DNS tablethen
       
# message for a bot 
       
forward message to that bot name  sort of TCP proxy
    else    
       
# message for a user 
       
forward message to the user port (sort of TCP proxy)
    
end 


notes:
- CS protocol https://github.com/bwilcox-1234/ChatScript/blob/master/WIKI/CLIENTS-AND-SERVERS/ChatScript-ClientServer-Manual.md#chatscript-protocol is yet ready for that
- the algo above is possibly better implemented by a double thread (one for manage incoming inbound msg from users, and a second one for outbound msgs to bots)


make sense?

 

 

 
  [ # 5 ]

I implemented this in Java backend AJAX web front end a while back but included the ability to talk to all kinds of bots, AIML, the original Eliza, python bots, Chatscript, etc.  I used JNI to embed chatscript in the java engine ( and other chatbot frameworks too).  It was hilarious to ‘listen’ to the bots talk to each other and join into the conversation.  I still might release it to open source one of these days if the commercial angles don’t play out, and yes, it’s pretty much an asynchronous bus that makes up a ‘conversation’ that different bots and people can ‘join’. 

One of the interesting aspects of this experiment for me was the idea that currently bots are being used for 1-1 conversations, so they always respond to every query.  This is not natural conversation behavior obviously, and as soon as you have more than 2 bots talking to each other it becomes clear that conversational context, bot ‘goals’, and bot ‘personality’ might be needed so that bots offer responses only when they think it would benefit the conversation and also if it aligns with their ‘goals’.  The idea of questions being pointed at the group or at an individual also becomes important.  Remember you last dinner party, and how the people in a conversation ebbed and flowed, dynamically and organically grouping and ungrouping across all the guests?  Other ideas like different levels of participation like ‘listening’ or ‘overhearing’ a conversation, where you are parsing the context and content, but not ‘talking’ also were explored.

There is a lot of unexplored territory to cover here. 

 

 
  [ # 6 ]
Todd Kuebler - Oct 16, 2017:

There is a lot of unexplored territory to cover here.

Thanks Todd,

1. tech side:

and back to the original point (how to keep in touch multiple CS bots, as separated TCP server) I’m thinking about a general purpose, low level software, virtually independent from any specific application context. Just a router/dispatcher. That could be realized with the pseudocode I wrote above. I’m also thinking about how to use a standard linux openvswitch.

More generally, fantasizing about an “internet of bots” (not just ChatScript), but anything, I feel that websocket protocol ( https://en.wikipedia.org/wiki/WebSocket )  is possibly a better solution for message based (bots) interchange, instead of TCP sockets (and so HTTP).
I have to deepen about it.


2. business implications of group chat with bots:

Of course sound bizarre to connect any bot to any other independent bot with one-to-one connection.

What could be instead interesting is to have a group chat populated by humans and bots.

Two real scenarios are Slack and Telegram (with Groups) platforms. btw, many months a go I sketched some examples here: https://github.com/solyaris/BOTServer/blob/master/wiki/services.md#5-complex-group-chat-multiple-humans-multiple-bots)

both platforms act as “hubs” and bot authors can test ideas… smile

 

 

 
  [ # 7 ]

A kind of multi-agent discussion system M.A.D.s

a new concept and an exciting playground ... until they no longer need us to exist shock

 

 
  login or register to react