Hello Jarvis!!! With DialogFlow

Sejal Baraiya
IndiaNIC
Published in
5 min readOct 14, 2017
https://blog.dialogflow.com/post/apiai-new-name-dialogflow-new-features/

Introducing Dialogflow, the new name for API.AI

API AI is natural language to talk with Jarvis and processing capabilities to our applications, services and devices. API AI will change name with DialogFlow for new features like Analytic tool for the 33 Pre-built agents.It will helps to develop new features.

To get more information about a new name for API AI go to https://blog.dialogflow.com/post/apiai-new-name-dialogflow-new-features/.

The process an API.AI agent follows from invocation to fulfillment is similar to someone answering a question, with some liberties taken of course. In the example scenario below, we compare the “human to human” interaction with a conversation with an API.AI agent.

More Information we can get from https://api.ai/docs/getting-started/basics website and we are going to clear about it.Firstly create the new Agent which our Answering machine. Like I have given Jarvis.

Then we have Intents and Events into API AI account which we have so we have to create our personal Intents and Events.

Intents are messages or User what says to Jarvis.

Events are for what actions on the Intents going to perform.

Introduction about API AI features:

1.Webhook

We can check the fulfillment option their which is Webhook part with an API which we want to integrate with it. For example, Weather API.

How to Integrate the Externam APIs Webhooks

As shows above image the API Webhook will use to get your own information what you want to speak with Jarvis.e.g. I used Heroku for creating weather API. For more information you can go to,https://dialogflow.com/docs/examples/online-store-support-webhook

2. Integration

Another thing is integrations with different platforms like Action on Google, Facebook Messangers, etc..

Integration with different platforms

1.Facebook Messenger

Step 1. So as above one can see the different platform integrations and their setting also. In that one can get the description of what we have to do.

In Programmatically Purpose, one can get our agent Token Where we have two tokens: Client Access Token and Developer Access Token into the setting of our Agent. We have to add the Client Access Token into the ACTION_KEY in class.

API Keys

The Source code is here: https://github.com/api-ai/apiai-android-client

Step 2. We can check this source code and give our key into Config.class which has ACCESS_TOKEN so can give our Agent token.

For Integration, First we are going to talk about the Facebook Messenger. Earlier this year, Facebook said bots were coming to its Messenger app. Well, we might not have realized this, but they’re already available.

Many bots have actually been available for months. It’s hard to tell, however, because they’re buried in the Messenger app and hard to locate. But they aren’t hard to use. we can use them to play trivia and games like hangman, or one can order flowers and get customer service support.

The possibilities are endless. Bots are designed to not only bolster our chat experience, but also make life easier for us.

If we want to get some information that how to create bot with using API.AI then we can go to http://www.android4devs.com/2016/12/how-to-make-facebook-messenger-chat-bot.html and http://www.pocket-lint.com/news/137988-facebook-messenger-bots-what-are-they-and-how-can-you-find-them those both sites have enough talked about the Messenger bot.

2.Action on Google

Then it comes to action on google we have to test our events and intents and visit to console and talk with google action.One can see below the window which is for google assistant setting.

Set intents with google and test it.

As you see the welcome is compulsory terms for fill and then triggering intents for perform the actions on google.Then go for test and visit the console for that.

Test the draft which you created for Jarvis

Other features:

This is the all details which we are prepared for integration.

Now next is Prebuilt Agents which are already built by dialogflow (API AI). We have to change ACTION_KEY into code as changing agents. So we can get access that all agents and test them.

Prebuilts Agents list

As you can see above image one can give the Prebuilt Agents API_ KEY also, which is we can see in our dashboard.

Another one is small Talk which is the Jarvis is going to answering our questions so one can modify there to get the correct answer.

As a Default Intent which is always given answer is selected Default FallBack Intent so we can disable it if we do not want to use that.

So, this is the dialog flow (API AI) which are, we need to know more and using it for any AI purpose and Talk with Jarvis.

Hope this helps you kick start learning and R&D about the DialogFlow with this introduction.

If you want to learn more about dialogflow, then you can check reference sources.

If you find it is helpful to you then please leave comments below if you have suggestions and share with others.

Thanks for the reading 👍.

--

--

Sejal Baraiya
IndiaNIC

Software Quality Assurance Analyst and Android Developer | Always be ready for learning new things. It’s exciting….