Software Bots
Total Page:16
File Type:pdf, Size:1020Kb
Editor: Christof Ebert SOFTWARE Vector Consulting Services TECHNOLOGY [email protected] Software Bots Carlene Lebeuf, Margaret-Anne Storey, and Alexey Zagalsky From the Editor Bots have become a common user interface for software services. Many people prefer bots to real persons owing to bots’ perceivable passionate “personality.” The Turing test obviously has been passed. However, bots’ involvement in social net- works and fake emails in elections exposed major risks. A lot still must be done, in- cluding some indication that “you’re now talking with a bot.” Here, Carlene Lebeuf, Margaret-Anne Storey, and Alexey Zagalsky discuss current bot technology and present a practical case study on how to use bots in software engineering. I look forward to hearing from both readers and prospective authors about advances in software technologies. —Christof Ebert FROM COMPUTER PROGRAMS’ intended to fool users into believing Bots and Software earliest days, people have dreamed they’re interacting with a real person, Development about programs that act, talk, and but many bots do have a pleasant, en- Bots are rapidly becoming a de facto think like humans. Such programs gaging personality. interface for interacting with soft- could not only automate tasks that Bots typically reside on platforms ware services. This is due partly to humans perform but also work with on which users work or play with the widespread adoption of messag- humans to solve intellectual tasks other users. They also frequently ing platforms (for example, Facebook that can’t be entirely automated. integrate secondary services into Messenger for social networking Even as far back as 1966, the hope communication channels, providing and Slack for developer communi- was for these programs to pass the a conduit between users and other cation), and partly to the advance- Turing test,1 in which humans are tools. They might fetch or share in- ment of natural-language processing, fooled into believing they’re interact- formation, extract and analyze data, which many bots leverage. But an- ing with an intelligent human rather detect and monitor events and ac- other driver is the prevalence of big than a mere program. tivities in communication and social data, along with machine-learning The terms “chatbot,” “chatter- media, connect users with each other algorithms for analyzing data across bot,” and “bot” were interchangeably or with other tools, or provide feed- many domains. Bots provide a con- used to describe the realization of this back and recommendations on indi- venient way for developers to gener- vision quite early on. But now, they vidual and collaborative tasks. ate a UI for interacting with these refer mostly to a conversational-style Here, we discuss types of bots, algorithms and data. UI, an anthropomorphized script, describe some platforms for working Major software companies are or an agent that automates rote and with them, and offer guidelines on recognizing the value bots bring in tedious tasks. Bots typically aren’t how to create and use them. terms of integrating services, users, 18 IEEE SOFTWARE | PUBLISHED BY THE IEEE COMPUTER SOCIETY 0740-7459/18/$33.00 © 2018 IEEE SOFTWARE TECHNOLOGY and communication channels. Face- in a command-line interface. Other • Productivity bots improve user book aims to “replace apps” one bot bots might parse natural language or team productivity by auto- at a time in its messaging platform,2 through text or speech. These bots mating rote or tedious tasks (for while Microsoft claims that “conver- might also embed rich UI controls example, updating calendars or sation as a platform” is the OS of the in a platform that lets users respond silencing notifications). future.3 quickly. • Collaboration bots help users Alexa, Siri, IBM Watson, and Bots can support a pull-based ap- communicate, coordinate, and Google Now all support this shift proach in which users initiate interac- collaborate (for example, con- toward bots. There are also many tion with them (for example, a user necting the right people at the bots in the platforms software devel- invokes the bot using commands such right time). opers use to connect with other de- as “Hey Siri”). They can also support velopers and services, such as Slack, a push-based approach in which they The sidebar provides examples of Microsoft Teams, and HipChat. initiate the interaction on the basis of how developers use bots to support The transition from command- some system or user context. their work. line interfaces to interacting with Another way to characterize bots bots through messaging tools feels is in terms of their intelligence: Creating and Hosting Bots intuitive to most developers. We see Although simple bots can be built new examples of sophisticated and • Adaptation. Some bots are from scratch and self-hosted, many innovative bots stemming from de- context-aware and might use developers leverage third-party veloper’s needs;4 these examples that context to change how they frameworks to streamline creation are paving the way for bots in other interact with users. and distribution. With the explo- domains. • Reasoning. Some bots follow sion of new tools for bot devel- This situation is inspiring the de- simple logic rules; others use opment, we need to distinguish velopment of bots for users, who are more advanced AI to drive their between the tools for building bots spending increased time in messag- behavior. (creation platforms) and the plat- ing applications and are embracing • Autonomy. Some bots are en- forms on which the bots dwell (dis- bots as an alternative to installing tirely autonomous, some rely on tribution platforms).5 and relying on external apps. How- human input before acting, and Companies such as Micro- ever, bot developers must carefully others use a mixed approach. soft and Facebook offer compre- consider not only where to host bots hensive tooling to support bot and how to create them but also Finally, we can characterize bots creation and distribution. Other when not to use them. according to their purpose: companies provide customized re- sources for specific creation and Botology: Understanding • Generalist bots such as Siri or distribution tasks. Table 1 lists the Bot Landscape Cortana support a range of some common bot platforms and Although the development and wide- simple tasks and direct users to the creation and distribution ser- spread adoption of bots have oc- appropriate external resources vices they use, along with other curred in just a few years, what’s when deeper knowledge is bot technologies. truly surprising are the diverse tasks required. and roles bots have taken on. Instead • Transactional bots work on the Creation Platforms of trying to narrowly define bots or users’ behalf, automatically exe- Creation platforms provide a variety chatbots, we embrace their diversity cuting transactions with external of software foundations, frameworks, and look for ways to characterize systems (for example, automati- toolkits, APIs, and other advanced their distinct features. cally making a purchase when a features (for example, natural- One way to characterize bots is price level is reached). language processing, search, and im- through their interaction model. • Informational bots fetch infor- age processing). These platforms Some bots support a domain-specific mation for users (for example, can be distribution-platform-specific language in which users interact gathering insights about stocks or produce bots that are deployable with bots using specific commands or providing weather updates). across multiple platforms, such as the JANUARY/FEBRUARY 2018 | IEEE SOFTWARE 19 SOFTWARE TECHNOLOGY DEVELOPMENT BOTS IN ACTION Software developers have been early adopters and proponents of bots because they’ve recognized bots’ potential for both enhanc- ing individual and team productivity and significantly improving software quality. Chatbots bring awareness and transparency to the communication channel and enable nontechnical team members to engage with operations without needing domain expertise (for example, by using a bot for deployment). For example, Sendwithus (sendwithus.com), a company that provides transactional email services, has adopted bots as part of software development. With 25 employees and two office locations (Victoria, Canada, and San Francisco), Sendwithus uses Slack as the central hub for its communications and DevOps, and bots fulfill several development tasks. For example, the bots • set reminders for team members (using Slackbot); • manage and coordinate customer support and help-desk tickets (using Help Scout; www.helpscout.net); • facilitate real-time communication with users visiting the Sendwithus website (using Olark piped into Help Scout; www.olark .com); • manage physical communication (for example, through short message service and phone) and send messages to the company’s communications hub (using Twilio; www.twilio.com); • accommodate custom tasks (for example, ordering a team’s lunch via a message on Slack) (using Hubot; hubot.github.com); • automatically share resources and documents (for example, screenshots) within the team (using Dropbox and Google Drive); • manage and track code migration and deployment from within Slack, raising team awareness when this happens, because this might cause errors during migration (using a customized bot with Heroku integration); • monitor and index runtime warnings, errors, and exceptions (using Papertrail; papertrailapp.com); • notify the appropriate team members when errors