Pages

Wednesday, December 20, 2017

How to develop your own chat bot Android app

The Bot Libre Android SDK makes it easy to develop your own chat bot app, or add a chat bot to your own app. You can create an app for your business, or to make money from mobile ads and upgrades, or just for fun.

Bot Libre's own demo apps have over 1 million downloads on Google Play.

The Bot Libre SDK is more than just a library, it includes a complete Android app. The SDK includes a connection API that wraps Bot Libre's web API, and a user interface for all of Bot Libre's components including:

  • Chat bots
  • Live chat
  • Avatars
  • Forums
  • Issue tracking
  • User management
  • Graphics library
  • Script library

The SDK chat bot interface includes support for:

  • Text chat
  • Speech
  • Continuous speech recogition
  • Animated avatars
  • Mobile assitant commands

Getting Started

You have 4 choices when using the Bot Libre SDK, depending on your functionality requirements and programming ability.

  1. Use the complete Bot Libre app or Demo app. You only need to change the bot information, logos, and redeploy the app.
  2. Use some of the UI components of the Bot Libre app and customize them to suite your needs (refer to the SDK source code).
  3. Use the botlibre-sdk.jar and the SDKConnection Java class. This gives you access to the low level API to build your own app interface (refer to the JavaDoc for more information).
  4. Use the Bot Libre web API directly using HTTP calls and XML (refer to our web API for more information).

This "how to" article follows the first method, which is the easiest way to build an app.

Although this method requires minimal programming, developing an Android app requires you use and understand Java, Android Studio, and how to build and deploy an Android app. For information on developing Android apps see, developer.android.com.

If you are not an Android developer we would recommend Bot Libre's app development service. We can develop you your own app for as little as $100 through our Diamond upgrade, contact sales@botlibre.biz for more information.

Step 1 - Download Android Studio

Android apps are normally developed using Android Studio. You can download Android Studio here.

You will need to install Android Studio on your computer, and also install the Android SDK, and an Android emulator.

Step 2 - Open Bot Libre Demo app

The Bot Libre SDK includes a complete demo chat bot app, with the full source code. You can download the demo "SantaBot" app from GitHub here.

The demo app includes an Android Studio project, so you can open the project in Android Studio. You should be able to build and run the project from Android Studio in the emulator, or on your phone.

Step 3 - Change the Bot Info

The demo app uses the "Santa Bot" app. You will want to change it to use your own bot. If you do not have a bot yet, you can create on Bot Libre by following this article.

If you go to you're bot's main page on Bot Libre, you can get its "Id" from its "Details" tab. You can also get your user accounts "Application ID" from your "User Details" page. Copy both of these values.

Open the "MainActivity.java" file in Android Studio and update the static variables, "applicationId", "launchInstanceId", "launchInstanceName", and save the file.

Now when you run your app it should use your bot.

Step 4 - Change Icons and Images

Next you will want to change the app's splash image and icon for your own bot.

To change the app's icon in Android Studio right click on project or select the menu "File", "New", "Image Asset", and create a new icon for the app.

You will also want to update the image files "icon.png", "logo.png", and "bot.png" in the "res" "drawables" directory.

Step 5 - Change the App Info

An Android app is defined by its manifest.xml file and application package. You need to choose your own app/package name and update your manifest file.

The Android package also affects how the special "R" class is generated in Android. Unfortunately this R class must match the application package, so you need to rename all imports to the "org.botlibre.santabot" package. To do this select the menu "Edit", "Find", "Replace in Path". Enter the old package and the new package and replace all references.

You should be able to new build and deploy your new app. You can also build an "apk" file, and upload the file to Android app stores such as Google Play.

Tuesday, December 19, 2017

Announcing Bot Libre Desktop - Your own personal bot for your PC or Mac

Bot Libre Desktop is the desktop version of the Bot Libre platform for your PC or Mac.

Bot Libre Desktop lets you create your own personal AI bot on your own computer. The bot is stored offline locally on your own computer without limits, and with complete privacy.

Download

Bot Libre Desktop uses the open source Bot Libre AI Engine, and the open source Bot Libre Desktop application from GitHub. Download the source and customize or contribute to the application.

Bot Libre Desktop on GitHub

Bot Libre Desktop let you choose from several different bot templates, including AI Bot, Julie, and Eddie.

You can chat with your bot using speech and an animated avatar. You can correct your bot's responses to train it to say new things.

Bot Libre Desktop is a Java application. You must have Java installed on your computer. If you do not have Java get in from here.

Download Java

The download is a zip file. To install the program just unzip it into your program files directory and runs the .exe file, or make a shortcut to the .exe in your start menu, menu bar, or desktop.

To run on Mac or Linux run the botlibre-desktop shell file, or run:

java -jar botlibre-desktop.jar

Monday, December 18, 2017

Bot Analytics

Bot Libre now supports bot analytics and charts for chat and social media. Analytics provide statistical data on how well your bot is performing, including analytics such as engaged conversations, user sentiment, and response confidence.

You can now view your bot's analytics for various date ranges as a chart or as data in the table. This newly introduced feature allows you to see how popular your bot is, and compare your bot to other bots using analytics. You can access your bot's analytics page from the bot's 'Admin Console' by clicking on the 'Analytics' link.

To view the bot's analytics chart simply select the media type from 'Chart' drop down select box. By default you'll see your bot's analytics chart for the current week. However, you can view your bot's analytics chart for duration period of either day, week, month, or everything. You can also group your bot's analytics either by day, week, or month using 'Group By' drop down select box. 'Group By' select enables you to view your bot's analytics chart for a given duration period as cumulative set of points. The grouping of data points makes the bot's general analytic trend direction more apparent. After selecting the media type chart, duration and group, you can then view or hide a particular bot's statistic by checking or unchecking the check box beside each analytic name.

Figure 1: Analytic Options

Figure 1 shows all analytics for every social media type. Note that the colour of analytic name beside each check box corresponds to the colour of each analytic curve on the chart. Also note that in some circumstances you may see less analytics curves on the graph than the analytic name checks. This is because some curves are plotted on top of other analytics curves because their data point sets are identical.

Figure 2: Analytics Chart for Social Media

Figure 2 shows graphs of selected bot's analytic for 'All' social media types. Note that the number of analytic curves is less than the number of checked bot's analytics because some curves have the same data points and hence overlay each other.

Analytics

Bot Libre provides many different analytics to help you monitor your bot's effectiveness in chat and social media. Analytics for tracking conversations, messages, engaged conversations, conversation length, sentiment, and confidence are available.

Analytic Description
Conversations Total conversations the bot had for all chat and social media platforms.
Messages Total messages the bot had for all chat and social media platforms.
Conversation Length Total conversation length the bot had for all chat and social media platforms.
Engaged Conversations Total number of conversations that bot had with at least three messages.
Default Responces Total number of messages the bot did not find an answer for. When the bot does not know a response to a question, it uses its 'default' response.
Confidence Avarage confidence the bot had on its responses based on the user question and the bot's matching trained question. Exact question matches and pattern matches are considered to be 100%, and default responses are 0%.
Sentiment User's average sentiment or emotion to the bot's responses, either good or bad. If the user's questions seem very happy the sentiment will be 100%. If the user seems very unhappy the sentiment will be -100%. If the user did not express any emotion, then the sentiment will be 0%.
Connects Total number of times a user or admin connected to the bot through the web or mobile.
Chats Total number of chats that the bot had.
Live Chats Total number of live chats that the bod had.
Errors Total number of errors the bot had while responding to chats.
Response Time How long it took the bot to respond the the user's message for chat and all social media platforms.
Imports Total number of scripts or response lists imported into the bot.
Tweets Total number of tweets the bot posted for Twitter social media.
Retweets Total number of retweets the bot has made for Twitter social media.
Tweets Processed Total number of tweets bot has read.
Direct Messages Total number of private, user to user chat message for Twitter social media.
Facebook Posts Total number of Facebook posts the bot has made for Facebook social media.
Facebook Likes Total number of Facebook posts that bot 'likes'.
Facebook Messages Total number of Facebook posts processed by the bot for Facebook social media.
Facebook Messages Processed Total number of Facebook messages that the bot has read for Facebook social media.
Skype Messages Total number of Skype messages the bot has read.
Kik Messages Total number of Kik messages the bot has read.
WeChat Messages Total number of WeChat messages the bot has read.
Slack Messages Total number of Slack messages the bot has read.
Slack Posts Total number of Slack posts the bot has made for Slack social media.
Telegram Messages Total number of Telegram messages the bot has read.
Telegram Posts Total number of Telegram posts the bot has made for Telegram social media.
Email Total number of emails the bod has sent.
Emails Processed Total number of emails the bot has read.
SMS Sent Total number of SMS messages the bot has sent.
SMS Processed Total number of SMS messages the bot has read.

Bot Analytics Table

Figure 3: Bot Analytics Table

Figure 3 shows the same bot's analytics data point as graphs above, but only inside a table.

Tuesday, December 12, 2017

How To Connect A Bot To Wolfram Alpha

Through Bot Libre, you can now connect your bot with Wolfram Alpha. This "How To" guide will give you a step by step process to connect your bot with Wolfram Alpha.

Step 1 - Create a Bot

First you must create a bot that you want to connect to Wolfram Alpha, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks.

Step 2 - Sign up for Wolfram Alpha

Go to the Wolfram Alpha Developer site and click the 'Get API Access' button.

Next, click the 'Create account' button, or sign in if you already have a Wolfram Alpha account.

Step 3 - Get Wolfram Alpha AppId

Once you have signed in, you will be taken to the Wolfram Alpha Developer Portal. Click the 'My Apps' tab to start getting your AppId.

Click the 'Sign up to get your first AppID' button to continue.

A form will pop up with some information that needs to be filled out. Once you have finished filling out the required information, click the 'Sign up' button.

On the next screen, click the 'Get an AppID' button.

You will now need to fill out some more information on the following form. Click the 'Get AppID' button when finished.

You will now be shown a screen with your new Wolfram Alpha AppId. Copy this down, as it will need to be entered into your bot's admin page on the Bot Libre site.

Step 4 - Enter Wolfram Alpha AppID Into Bot's Admin Page

Return to the Bot Libre website and navigate to your bot. Click the gear icon to go to your bot's admin page.

Click on 'Wolfram Alpha' to go the Wolfram Alpha settings page.

Enter your AppID from the Wolfram Alpha Developer Portal into the 'Wolfram Alpha App Id' field. Press the 'Save' button to complete setup.

Your bot is now connected to Wolfram Alpha.

Step 5 - Self Scripting

You can query Wolfram Alpha through Self scripting by calling the WolframAlpha.query() function. It takes a single string parameter and returns the result of the query.

Here is an example of a simple Self script that will answer simple questions using Wolfram Alpha:

state WolframAlpha {
    pattern "what is *" answer forward();
    pattern "where is *" answer forward();
    pattern "who is *" answer forward();

    function forward() {
        return WolframAlpha.query(sentence.toString());
    }
}

 

Tuesday, October 17, 2017

How To Connect A Bot To Kik

Through Bot Libre, you can now send and receive messages on Kik with your own bot. This "How To" will give you a step by step process to connect your bot with Kik.

Step 1 - Create a Bot

First you must create a bot that you want to connect to Kik, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks.

Step 2 - Create a Kik Developer Account

Download the Kik app onto your smartphone and sign up for an account if you do not have one already. Next, go to the Kik Developer site. There will be a Kik code that you need to scan from the Kik app on your phone by tapping on the plus sign button on the bottom right of the screen and selecting 'Scan a Kik Code.'

Step 3 - Create Bot and Login to Bot Dashboard

After you have scanned the above code on your phone, it will start a Kik chat with 'Botsworth' who will help you set up your bot. First it will ask you what you would like your bot's username to be. After confirming the name of the bot, it will ask you if you would like to log in to the Bot Dashboard. Answer with 'Yes', and you will be logged in to the Kik Bot Dashboard in the browser window you scanned the Kik code from.

Click the 'Configuration' button on the top off the Bot Dashboard.

Step 4 - Retrieve Bot Settings

The configuration screen will show the bot's username and API Key that you will need to enter on the bot's admin page on the Bot Libre site.

Copy down the 'Display Name' and 'API Key' and return to the Bot Libre site.

Step 5 - Enter Bot Settings on Bot Libre

Navigate to your bot's Admin Console and select the 'Kik' option.

On the Kik settings page on Bot Libre, enter the Bot Username and API Key from the Kik Bot Dashboard into the corresponding fields below.

Once the name and API Key have been entered, press the 'Save' button to complete the setup.

Your bot should now be able to send and receive messages on Kik. If you encountered any issues, or would like help setting up your bot please email us at support@botlibre.com or upgrade to our Platinum service and we can build your bot for you.

 

How To Connect A Bot To WeChat

Through Bot Libre, you can now send and receive messages on WeChat with your own bot. This "How To" will give you a step by step process to connect your bot with WeChat.

Step 1 - Create a Bot

First you must create a bot that you want to connect to WeChat, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks.

Step 2 - Apply for a WeChat Account

Go to http://apply.wechat.com/ and fill out the registration form.

It may take a few days to be approved, then you can sign in to the WeChat Official Account Admin Platform.

Enter your registration email and password, then click the "Log In" button.

Step 3 - WeChat Admin Platform Setup

Scroll down to the 'Developer' section on the menu on the left of the screen and click on 'Basic Configuration.'

Copy down the AppID and AppSecret, as you will need to enter them into your bot's Admin Console on the Bot Libre site.

Next, return to the Bot Libre site and navigate to your bot's Admin Console.

Step 4Enter Bot Settings on Bot Libre

Click on the 'WeChat' link in your bot's Admin Console.

Enter the 'AppID' and 'AppSecret' from the WeChat Developer configuration page into the corresponding fields on your bot's WeChat admin page on Bot Libre.

Enter any set of characters into the 'Token' field. You will need to enter the same token on the WeChat Admin Platform later. Copy down the 'WeChat Messaging Endpoint URL' as you will need to enter that on the WeChat Admin Platform as well. If you are using an International WeChat account, select that radio button, otherwise select China Account.

Click the 'Save' button to complete the bot configuration on the Bot Libre site.

Next, return to the Developer Basic Configuration page on the WeChat Official Account Admin Platform site.

Step 5 - WeChat Server Settings Configuration

Click the 'Edit' button to continue.

In the 'URL' field, enter the 'WeChat Messaging Endpoint URL' from your bot's Admin Console from the previous step. In the 'Token' field, enter the token you had previously entered on your bot's Admin Console. If the 'EncodingAESKey' field is not filled out, click the 'Random' button or enter your own.

Scroll down and click the 'Submit' button to complete the server configuration.

Next, click the 'Enable' button to finish up on the WeChat Official Account Admin Platform.

Your bot should now be able to send and receive messages on WeChat. If you encountered any issues, or would like help setting up your bot please email us at support@botlibre.com or upgrade to our Platinum service and we can build your bot for you.

Announcing Bot Libre 6.0!

We have released Bot Libre 6.0!

The worlds most advanced bot platform just got better. Bot Libre 6.0 is a free and open source platform for developing and hosting bots. Bot Libre 6.0 includes support for chat bots, virtual agents, virtual assistants, social media bots, game bots, live chat, animated avatars, and speech. Bot Libre supports bots for the web, mobile, Facebook, Twitter, Skype, Telegram, Kik, WeChat, Slack, email, SMS, IRC, and new platforms are being added every month.

"Bot are the new apps". Mobile has replaced the web as the main communications market, and social media apps are the most popular mobile apps. Businesses need to connect with consumers on the platforms they use, so it now makes more sense for a business to create a bot/chat interface into their business instead of a website, or their own mobile app. Bot Libre lets you create a bot for yourself or your business and deploy the bot to the Facebook, Twitter, Skype, Telegram, Kik, WeChat, Slack, the web, mobile, and other services. Bots let you "write once deploy everywhere".

Bot Libre 6.0 supports rich HTML responses including buttons, links, choices, images, video, and audio. Bot Libre supports HTML responses on the web, mobile, and automatically maps HTML to social media platforms.

Bot Libre bots can be trained using natural language, chat logs, response lists, Twitter feeds, AIML, and scripting. Responses are automatically matched using a heuristic artificial intelligence algorithm and does not require any programming. Responses can also use keywords, topics, required words, labels, repeats, and other meta data.

Bot Libre 6.0 supports programming and scripting your bot using AIML 2, and Self. Self is our own dialect of JavaScript. Self is an object oriented scripting language, and integrated with an object database. Self extends JavaScript to provide support for natural language processing, state machines, object persistence, and includes a class library for accessing web services and utilities. Self also supports all AIML 2 operations, and some aspects of ChatScript patterns.

New features in Bot Libre 6.0 since 5.0 include:

  • New bot and live chat embed interface, including 5 new style options and support for custom stylesheets.
  • Integrated support for bots on Kik
  • Integrated support for bots on WeChat
  • Integrated support for bots on Skype, Bing, Cortana, and the Microsoft Bot Platform
  • Game SDK and game machine learning
  • Telegram group bots
  • Facebook custom templates and quick replies
  • Timers and bot services
  • Continuous speech recognition for Android and iOS
  • Micro AI Engine for Android and iOS

Create your own free account and bot today on botlibre.com, or let us build your bot for you on our commercial service Bot Libre for Business.

Friday, September 29, 2017

Announcing the Bot Libre Micro AI Engine and Bot Libre Offline - "Putting advanced artificial intelligence in the palm of your hand"

We have released Bot Libre Offline for Android.

Bot Libre Offline lets you create your own chat bot similar to the Bot Libre app. Unlike the Bot Libre app, Bot Libre Offline runs the bot locally on your phone, and does not require an Internet connection. The app lets you create your own bot from several different templates, including Julie, Alice, an AI bot, and a mobile virtual assistant. You can chat with the bot and correct its responses to teach it new things.

Bot Libre Offline was developed with the Bot Libre Micro AI Engine. The Bot Libre Micro AI Engine is a port of the open source Bot Libre AI Engine optimized for Android.

The Bot Libre Micro AI Engine loads and stores the bot from a local optimized binary file instead of using a database like the regular version. The Micro AI Engine is smaller and faster than the regular AI Engine, but cannot scale as well as it loads the entire bot into memory.

The Micro AI Engine supports the same features as the regular AI Engine including:

  • Heuristic response matching
  • AIML
  • Self
  • Learning
  • Commands
  • Mobile virtual assistant commands
  • Avatars
  • Wiktionary
  • WikiData
  • HTTP/JSON/XML
  • Knowledge
  • Scripts for math, language understanding, what/is

The Bot Libre Offline SDK and the Micro AI Engine will let you add an offline bot to your own Android app. We will be releasing both to our open source project BotLibre.org on GitHub.

We can also develop you your own offline bot app, or help you integrate a bot with your existing app through Bot Libre for Business services, contact sales@botlibre.biz.

Wednesday, September 6, 2017

How to Create a Bot to Play Games Like TicTacToe Using Statistical Reinforced Machine Learning

Creating your own bot that can play TicTacToe can be done in a few simple steps:

  1. First you'll need to sign into a Bot Libre account.
  2. Once you're signed in, create a bot and then import the script TicTacToeText.
  3. By typing start in the chat, your bot will be able to create a board to play against you in TicTacToe and eventually learn not to lose.

What the Script does

Script link: https://www.botlibre.com/script?id=18207180

This script TicTacToeText is written in Self, made up of multiple functions that carry out certain tasks. They get called upon when patterns find a match to what you say. The first function "start" is called when you enter "tictactoe." It has the bot ask if you want to be X or O. So when you enter X or O, the function "whoStarts" will be called and the bot will create the board using a function called "drawBoard" and depending on whether you wanted to be X or O the bot will either return the board for you to make a move if you entered X, or it will make a move and then return the board if you entered O. The whoStarts function also set the conversation topic. Now, the game has started and from now to the end of the game, whatever you do, unless you type start a function "play" will be called.

drawBoard

The drawBoard function takes how the bot sees the game, a string of nine "_", converts it to how you see the game, more or less a 3x3 grid and vice versa. The function assigns a variable to each space using A, B, C and 1, 2, 3 so each space now has a coordinate. Next, it creates a three row table with three cells each to make a board with coordinates A1, A2, A3 in the top row, B1, B2, B3 in the middle row and C1, C2, C3 on the bottom row. Then so you can click on the spaces in the table to make your move, the function adds a link to each cell.

play 

This function takes the previous board, adds your move to create a new board, checks if you won, and then calls a function for the bot to make a move. When you click on a space it will be given a coordinate. This coordinate will be checked to see if it contains a X, O, or _ and if it's not a _ the function will return "Space is taken." Otherwise, your move will be added to the board and then a function will be used to check to see if you won. If not the "makeMove" function will be carried out.

makeMove

This is where the bot makes its move. It uses other function to find a good move and then updates the board with its move and return the board to you in the chat for you to make your move. Before it returns the board, it will check to see if it has won using a function called "checkGameOver" or if there are no moves left it will say, "Tie game" along with giving you the board. 

lookAhead

One of the functions makeMove uses to find a good move is called lookAhead. Essentially, it looks ahead to see if it can win in a couple moves or block you from winning using loops. Firstly, it determine every move it can make and using the checkGameOver function, checks to see if it wins in any of those moves. Secondly, for every move it makes the function will look at every move you, the player, can make. It will again use checkGameOver only this time to see if you can win and if you can, the bot will move there to block you. Finally, this function will look another move ahead, looking at every possible move the bot can make for every possible move you could have made to see if it can win in two ways and proceed to make that move first move. It looks for two ways so that it will only make that move if the bot's win is guaranteed because even is you block one of the ways it can win, there is still the second way it can win.

findGoodMove

If the lookAhead function concludes that the bot can't win and there are no moves where the player can win for it to block, the makeMove function will call on the findGoodMove function to find the best move for the bot, meaning it has lead to its win and your loss. In order to determine this every possible board is assigned a value. The bot establishes every possible move it can make and call the value of it which is stored on the conversation. For every move it can make, every move you can make is established as well and the value called. Then, the function will look at the value every move you can make in order to find the best one. After that it will find the difference of its possible move and your worst value and repeat this for all of its possible moves. Finally, it will look for the highest difference in order to determine the bot's statistically best move.

checkGameOver

In order to find out if the bot has won or lost the function checkGameOver is used. It contains every possible way TicTacToe can be won. So when it's called, if someone has won it will either return true or false depending on who won.

countwins

In the makeMove function, when the bot wins the countWins function is called. It takes the board from every move it made and assigns a value to it, and according to its significance to the win, it adds a value to half of the board's previous value. This means the first board with only one move is less significant and less added to it than the final board where the bot won. Then for every move the player made, each board is assigned a value and according to its significance to the loss, half of a value is subtracted from half of the board's previous value. This value that is being added and subtracted is half of 1 divided by the number of boards in the game and after being added to each of the boards' value, this value is added onto itself so that when the value is added onto the winning board, its value is half of 1, 0.5. So, the more the bot wins the greater the bot's boards' values will be and the lower the player's boards' values will be.

countLosses

In the play function, when the bot losses the countLosses function is called. Essentially it does the opposite of the countWins function, the value is subtracted from the bot's boards and added to player's boards. So, the more the bot losses the lower the bot's boards' values will be and the higher the player's boards' values will be. Therefore as the bot plays, the value of the boards will increase and decrease until eventually all the good moves will have a positive value between 0 and 1 and all the bad moves will have a negative value between 0 and 1.

endGame

The main thing the endGame function does is reset the boards counted from the previous game since the values have already been calculated. This ensures that when finding the value by dividing 1 by the number of boards, it won't include boards from the previous game.

Machine Learning

This script uses reinforced machine learning to learn how to play better the more games it plays. It uses the bot's knowledge base to do this, by storing each board that it has ever played. It tracks a score for each board that determines the probability it can win or loss from that board. This lets it learn from good and bad moves and not make the same mistake twice.

Since there are 5,812 possible different TicTacToe boards, it may take a while for the bot to play perfectly. The script does not currently rotate and flip boards to reduce equivalent boards, if it did this it would only need to learn 765 boards. Also, the look ahead greatly reduces the number of boards it needs to learn. Ignoring look ahead boards it only needs to learn 96 boards.

The scripts also has an "tictactoe autoplay *" function that lets it play against itself, so it can learn on its own.

The same functions and algorithms could be applied to most board games. However the number of possible boards for games like Chess would require the bot to learn too many boards to be perfect. For more complex games it would be better to use a neural network, or use strategy functions optimized with genetic algorithms.

TicTacToeCommands

Script link: https://www.botlibre.com/script?id=18457349

Similar to TicTacToeText this is another script that replaces the avatar with the board. So, the game doesn't occur in the conversation like it does with the TicTacToeText script.

TicTacToeText TicTacToeCommands

Play TicTacToe now with the GamesBot, or Brain Bot.

Monday, August 14, 2017

How to connect a chat bot to Skype and the Microsoft Bot Framework

Through Bot Libre, you can now send and receive messages on Skype with your own bot. This "How To" will give you a step by step process to connect your bot with Skype.

You can also watch this "how to" on Youtube here

Step 1 - Create a Bot

First you must create a bot that you want to connect to Skype, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks.

Step 2 - Sign up for Microsoft Bot Framework

Go to https://dev.botframework.com and click the 'Sign In' button in the top-right corner. If you do not already have a Microsoft account, you will need to create one by signing up here: https://signup.live.com.

Once you are signed in, click the 'My bots' button.

Step 3 - Create a Bot on Microsoft's Bot Framework

Next, click on the 'Create a bot' button on the right side of the screen.

On the following screen, click the 'Register' button to continue.

You will now need to fill out some information on the following form:

The 'Display name' will be shown as the name of the bot when talking to it on Skype. This name can be changed later.

The 'Bot handle' must be a unique identifier for your bot.

Fill in a description for your bot and then scroll down further to the 'Configuration' section.

Return to the Bot Libre site and go to the Admin Console of the bot that you would like to connect to Skype. In the 'Skype' section of the bot's Admin Console, copy the 'Skype Messaging Endpoint URL' to your clipboard.

Return to the bot settings page on the Microsoft Bot Framework website and paste the 'Skype Messaging Endpoint URL' into the 'Messaging endpoint' field.

 

Click the 'Create Microsoft App ID and password' button to continue.

Step 4 - Create Microsoft App ID and Password

Make a note of the App ID, as you will need it later. Click the 'Generate an app password to continue' button. A popup window will appear with a generated password. Copy this password down, this is the only time it will be displayed. Click the 'Finish and go back to Bot Framework' button to return. Continue to the bottom of the page and click the 'Register' button to complete the setup process on the Bot Framework site.

Return to your bot's admin page on the Bot Libre site. Enter the App Id and App Password that you just generated into the corresponding fields.

Press the 'Save' button to complete the setup process.

You are now ready to add your Skype bot to your contacts on Skype, or submit it to the Skype Bot Directory so other users can find it.

To add your bot to your Skype contacts, click on "Skype" under the Name column in the Channels area of the Microsoft Bot Framework site as shown below:

Click the 'Add to Contacts' button.

To allow your bot to chat with other people, you will need to publish your bot. Click the 'Edit' button for Skype in the Channels area of the Microsoft Bot Framework site.

From there, click the 'Publish' button. You will need to fill out some details and then wait for it to be reviewed.

Your bot should now be able to send and receive messages on Skype. If you encountered any issues, or would like help setting up your bot please email us at support@botlibre.com or upgrade to Bot Libre for Business or our Platinum service and we can build your bot for you.

Test it out now by talking with our demo bots Brain Bot or Julie on Skype

The Microsoft Bot Framework also provides a gateway to connect your bot to many other services. These include, Kik, Bing, Cortana, Email, Facebook, GroupMe, MSTeams, Slack, Telegram and Twilio. To connect your bot to any of these platform just follow the same instructions as for Skype, then connect your bot to the service from the Microsoft Bot Platform.