A Modern Bot Architecture



Bots. Bots. Bots. You’re hearing all about Bots these days. That’s because we’re at a point in time where the intersection of Cloud Computing, IoT & Wearables, Data Science and Machine Intelligence along with the rise of Messenger apps, which have become the modern day homepage for most people, brings us unparalleled opportunity to create smart, personalised services. These are the Bots.

Every day I’m seeing new Bots being released for the most exciting platforms - Facebook Messenger, Slack, Telegram and Whatsapp.

Every day I’m seeing new tools to help developers build and distribute their Bots along with continued investment and development of the more established existing players.

Clearly, the time is now for Bots.

For me, it’s clear that the Bot paradigm shift (the term Bot for me is merely a proxy for intelligent personalised services) requires a new toolkit. Many are making the tools, but it’s still clear that in this micro-services world, there exists a big challenge.

Taking a brief step back.

To create a Bot, what do you need?

- Technical skills. Most of the Bot creation tools are aimed at developers, first and foremost. Anything beyond a visual flow editor, will require some programming knowledge.

- Writing skills. Whilst you may know what to say in the real world and can put this language into your service, actually writing as Bot character in a way that will succeed in engaging users on a personal and emotional level is tough.

- Domain expertise. You can’t write a great a Bot if you don’t understand what that Bot is supposed to do, how it’s supposed to behave and the type of results expected from it when compared to real world alternatives. You can’t write a Bot that has deep knowledge of the subject matter, without first possessing deep knowledge of the subject matter.

Along with these areas, it helps to have a good grasp of basic psychology, a respect for social conventions and not being an arse (otherwise, it follows that your Bot could likely end up a roboArse too).

So, it’s not enough that our toolkit is simply a suite of SDK’s, open source servers and machine learning engines. Our toolkit needs to factor in the different roles, skills and personas of the people in a team, responsible for the Bot creation process.

It’s a similar, but albeit more complex, challenge to the one I wrote about in the future of website design (and these two subjects are linked, but more on that another time).

##Future Toolkits for Bots (intelligent, personal services)

My experience building our own Bot prototype, along with my research and my understanding of the roadmaps of many of our customers has lead me to define a new stack. One which I felt I needed to successfully overcome the shortfalls of my own Bot and to help other multi-disciplinary teams create and distribute their own next-gen services.

This stack has 4 Pillars:

1. Data
This is basically all of the last 10 years of software wrapped into one. Cloud services, data stores, in-house and 3rd party REST APIs, M2M communications for streaming IoT data to a scaleable store. It should be easily accessible, low-maintenance (especially early on). Where possible, the underlying software should be open-source, have an option to be self-hosted or easily migratable later in life. I shouldn’t need a sys ops team and database admin to get started.

2. Logic
Making all the data we now have “actionable” is the initial critical step, towards increasingly personalised services. Being able to segment users based on the data and scenarios and perform actions automatically when certain criteria are met. Up until now, this has been the business logic of our applications and it’s been heavily restrictive. There should be appropriate interfaces for different members of the team, that enable everyone to contribute at this level.

This set of features, the ability to monitor data in the background and respond automatically, gives us the ability to create a pro-active Bot. A Bot that can start a conversation.

In my experience, this is a great way to prototype scenarios.

But you’ll also find very quickly, that you’ll end up with 20 - 30 or more subtly different variants of scenarios, to accommodate edge cases and outliers. It becomes hard to manage and not particularly scaleable.

3. Machine Intelligence

When the logic engines have outlasted their usefulness, which can happen quite quickly in some cases, then we need to quickly move to a new service powered by machine learning.

For example, we have a Logic Engine that now has 40 variants of a logical scenario, that has grown in terms of the number of conditions and comparators added to handle a situation when a person has missed taking some medication.

We can take the data that we do have and move into a machine learning predictive analytics or anomaly detection engine, that will consider the data sets we consider relevant to alert us when the given user is likely to meet the conditions otherwise handled by the complex stack of logic engines.

4. UI Components & Distribution

In order to make Bot and smart service creation a truly transformative shift, it needs to be very clear how to take a Bot to market, how to reach audiences where it is most appropriate to do so and to have seamless processes for transactions to take place that contribute to the business model of the Bot creator and the peripheral network, ideally.

Most of the mainstream messenger platforms are investing heavily in building their integration APIs for Bots. They’re investing in the community and incentivising Bot creation to stimulate higher velocity innovation.

But we shouldn’t just be dependent on the 3rd party environments for distribution. I believe, even more so than the argument of website versus mobile app versus facebook page, that the central “brain” of your Bot can exists without specific platform dependencies and it’s our challenge to make it much less a decision about which platform and more about which user and under what terms you engage them, regardless of where they are. It’s all part of being more personal.

This is ultimately the framework that is driving our development at Nuwe. This is the toolkit we’re creating, to help you build messenger / chat Bots - sure, but any intelligent personalised service enabled using technology for any platform - mobile apps, smart cars, smart homes, amazon echo.