The Bot Lifecycle


By Beerud Sheth

Founder & CEO |

May 17, 2016

Bots are exciting. Everyone is talking about it and everyone wants to build one. Some of the early bots have gotten mixed reviews — they’re interesting, but they’re essentially toys. As people start working bots with more capabilities, developers must appreciate and plan for the entire bot lifecycle. From our experience building hundreds of advanced bots, and helping developers build thousands more, below is what we see as the end-to-end bot building process.

The steps of a bot lifecycle are as follows:

image for blog

  1. Requirements

Gather market requirements for the bot: who’s the target customer, what are the pain points and what benefits the solution will deliver. This step is similar to any other software project, though other steps below are unique to bots.

  1. Spec

Develop a product spec for the bot identifying the features and functionality of the bot. The features should deliver the benefits identified in the Requirements step. Note that the spec must also include short and long description of the bot along with other collateral that will be required later in the Publish step.

  1. Script

While the first two steps are similar to that of other software lifecycles, this step is unique to the bot building process. While websites and apps have structured interfaces, bots have a conversational interface. Instead of building wireframes like we do for websites and apps, this involves building conversational scripts that represent user interactions.

The conversational script must be representative of actual user conversations. Since the conversational interface has no tabs or prompts, the bot script must guide the user towards accomplishing the desired task. Depending on the context, the script may or may not support NLP capabilities. If the bot is designed with NLP in mind, the bot script must handle a wide range of variations in user inputs. Note that NLP and AI must be used with caution. Too much of it can raise user expectations and lead to disappointment.

  1. Architect

Create the engineering design for the bot. This includes both the front-end and back-end components. The front-end refers to the conversational interface — translating user input into specific actions and vice versa. The back-end refers to computation performed by the bot as well as integrations to other web services.

  1. Dev

This is the development stage where the bot is developed. Given the conversational interface, bot developers will find themselves iterating a lot more between coding and testing than in traditional software development. Soon as the bot is coded to handle a specific set of conversational statements, it’s a good practice to unit-test the code through the messaging interface.

Developers must also insert tracking probes into the bot — these will be helpful at the Track stage.

  1. Test

As described above, the testing is deeply intertwined with the development process. However, testing is tricky for a bot developer. The code must be tested not just in the emulator, but also in the actual messaging platform. Given the diversity of messaging apps, and the differences in message rendering, this can be a time-consuming process. Also, different messaging platforms have different guidelines and access limitations for test bots.

Apart from the unit-testing during the dev cycle, this step also includes the final QA of the bot. The QA process must run the bot through the conversational scripts developed above. The QA process also needs to be aware of, and ensure compliance with, the Publish guidelines of the messaging platform. Messaging platforms have different guidelines (e.g. bots must not spam, they must introduce themselves, explain themselves, behave themselves, handle exceptions etc).

  1. Deploy

Once the bot is built, it must be deployed to a hosted environment. The hosted environment must be stable and needs its own monitoring and devops support.

  1. Publish

Once the bot is tested and deployed, it must now be submitted to the various app stores for approval. Each messaging platform has a different approval process, with varying degrees of rigor. The submissions require a variety of descriptive elements such as a short description, a long description, images, scripts, videos etc (best to develop these in the Spec phase). Messaging platforms also require their bots to be “well behaved” and self-explanatory. This process can take from days to weeks and involve multiple iterations, with multiple gotchas for the first time publisher. Making this harder is the fact that approval processes are evolving too, making this a moving target!

  1. Monitor

Once the bot is published, it must be monitored. I don’t mean just ops monitoring as mentioned in the Deploy phase. I mean monitoring the bot using actual conversational scripts. The ops monitoring may indicate systems are well, but the bot may still be unresponsive to certain user conversations. The best way to monitor the bot is to monitor the user conversation.

  1. Promote

While publishing to the bot store is the first step, there are other options to make your bot discoverable. There are cross-platform bot stores that are off the messaging platforms that may still drive traffic to your bot. New advertising channels are emerging that will introduce your bot to new users.

  1. Analyze

As the bot starts being used, its performance must be tracked and results analyzed. This involves reviewing both conversation logs and usage metrics. Analyzing conversational behavior is different from analyzing click-paths for websites and apps. The ideal conversation is the one that enables users to accomplish their task with the least effort. Depending on context, this may mean shorter or longer conversations — the one that imposes the least cognitive load on the user is the best. Developers must identify and fix the leakage points — where the conversations are breaking or being abandoned.


The learnings from the Analyze phase can be cycled back into the bot development process to build an ever-improving bot. Some bots may even be programmed with self-learning AI programs that need inputs from users and trainers to continuously improve themselves.

Building good bots isn’t easy. A little bit of structure and process goes a long way in achieving bot success. Also, my company, Gupshup, is building a bot platform that makes it easier and faster for developers to build better bots. More on that in the next post. Meanwhile, happy bot building!

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *