Python Chat bot integration with Cisco spark

What is a Bot application?When a novice heard the term 'Bot', he/she gets little bit confused of what it really means. So this term is related to 'Robot' in technically and it is actually an automated program which can be used for several purposes such as automated chat systems, personal assistant applications, etc. These bot applications can be divided in to several categories such as self learned bots and supervised bots.

Self learned/ unsupervised bots are kind of intelligent bots. These bots are nearly replaces humans but not completely. Artificial intelligence and deep learning are some major factors in unsupervised bot applications. For an example Siri, Cortana are some great unsupervised, self learned bots.
Supervised bots are deviating from unsupervised bots by their tasks and the way they have been built. These bots does not have the intelligence power like unsupervised bots. It is always programmed to respond only for some certain problems. The technology behind these bots can be a huge chunk of data and from those data chunks only they can respond to the questions they get. As an example, If we build up a chat application we can integrate a supervised bot to reply for the messages we get when we are not available to chat. Since these bots are less intelligent, these messages can be programmed to welcome messages, user is not available messages, etc.

From this blog post I have tried to give you the idea of how to build a chat platform using Cisco Spark and to integrate our own bot in to that. For this post the bot script is written in Python and it can be written in any language.


  • First we should create a developer account in Cisco Spark in order to get access for a chat platform. To proceed, visit : https://developer.ciscospark.com/
  • Then follow the instructions in Getting Started, and you will find how to create an account in Cisco Spark. This will provide you a chat interface too and that will be the chat application which is assigned under your credentials. But for our task this is not what we need. 
  • After the creation of Cisco Spark account, now we have to create bot account through our account. For this task Cisco has provided us 'My Apps' category along with our account.


  • From this we can create a Bot account which provides by Cisco Spark. This account contains several information like bot's email address, access token, etc.
  • After all these steps, now we can directly go into our Python bot script and state these information we gathered from our bot account. Then it can use the Cisco Spark chat platform as it's chat back-end. So that we can now test our Python bot script by sending msgs to it. 

  • NOTE: since this bot is a supervised one, It can only reply for certain pre-programmed requests only.
  • Finally we should create a webhook to retrieve requests which are sent to the bot. Without this the bot cannot identify the request since it does not automatically triggered when someone buzz him. Below you can see a demonstration of this bot application and under that you can find the Github link to access the scripts. 

Github : https://github.com/SamPiy93/Python-Bot-Integration.git

Comments

Popular posts from this blog

Dynamic Routing Demonstration Using CISCO PACKET TRACER and RIP

Containerize Java Application & Deploying on AWS Elastic Beanstalk