AI Zone Admin Forum Add your forum


On June 28th, 2017 we're organizing our next Chatbot Meetup in Amsterdam, The Netherlands. Feel free to join!'

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.


  login or register to react