AI Zone Admin Forum Add your forum

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

Interfacing my CS server with a mobile application

Now that I have my chatbot server up and running (many thanks to you guys! smile )

I have been wondering on how can I make it RESTful so I can implement it in a mobile application.
I am writing the app for iOS swift and using the cocoa pod library Alamofire to handle the networking between the app and the server.

I was just wondering on how you have able to accomplish this on both the client and server sides.
And if there are any examples that you may have posted on GitHub that I could have a look at as well?
I understand if you don’t post server side code for security but I am interested in how networking is implemented between the server and client.


  [ # 1 ]

Hi Timothy & welcome

ChatScript doesn’t provide the front end (the chat GUI for the final user).
You can use facebook messenger or anything - there might be out of the box components for smartphone apps.

You will also have to write a bridge between this front end and your CS server. The front end cannot (should not) call CS directly.
This bridge will basically receive message and call CS via sockets. There a sockets libraries for any languages, and calling CS via sockets is really easy.

We use for the front end and we have written a node.js bridge. The bridge derives from
We have basically just added sockets communication with CS on this app.


  [ # 2 ]

Almost by definition, conversation is not RESTful, somewhere a history of context is kept.
If you are merely using CS to look up an answer and NOT have a conversation, then it can be RESTful.

CS is designed to track conversation by keeping a file per user


  [ # 3 ]
Timothy Richardson - Apr 14, 2017:

I am interested in how networking is implemented between the server and client.

There is a manual for that.

wink  Basically the area you are interested in is the protocol - then look at numerous client examples for implementation.  Here is one in Java from previous discussions.

Another idea is to embed chatscript into your application itself and cut out the network trip entirely. The part of the wiki describing that is here.


  [ # 4 ]

Hi all

@Todd thank you for your CS github examples grin

the fact Chatscript can run ON an embedded device (mobile phone, ioT devices) as a “standalone” local server (without going through internet, aka “the network trip”)  is an UNDERRATED great feature.

regarding client - server I wrote a draft thin/work-in.progress interface in Ruby

To set/get GUI front elements there is a need of a middleware that match possible CS input/output to GUI frontend methods/widgets. For that, OOB messages are a solution.


  [ # 5 ]

Hi Guys, my question might be a bit different to what i read at the top, but is anyone able to tell me if it is possible to integrate chatscript to work with NODE RED so i could create flows on node red and chatscript will understand the requests ?
The main reason of that is to use drag and drop options in node red to customize the flow in which chatscript will understand it ?.
Or is there any UI that will allow the user to configure chatscript ?

Thank you


  login or register to react