Chapter 18. Bot Building Overview

Whatever good things we build end up building us.

—JIM ROHN

BUILDING A BOT is a topic worthy of a book of its own; it would be foolish of me to presume to teach anyone to build a bot in one chapter. Moreover, this is a design-focused book, so it might not be relevant to you to know all the details and processes involved in engineering a production-ready bot. Having said that, it is important for everyone in this industry to have a basic knowledge of how the technology works and what kinds of tools you can use to build a bot.

Bot Architecture

In contrast to mobile apps, bots are not installed (deployed as native code) on the platforms on which they run. Instead, the bot connects to the user or team through a set of application programming interfaces (APIs). In addition, the bot service does not ever communicate with the chat client directly; it is all done through the proxy of the chat platform service provider (e.g., Slack, Facebook, Kik, or Amazon’s servers).

Key takeaway

Bots are not installed in the messaging clients; they are connected to the clients via APIs.

As you can see in Figure 18-1, the chat platform relays messages from the clients to your bot, and can add information such as presence and other events. The chat platform lets your bot send messages and perform additional operations, such as creating channels, inviting users to a conversation, and broadcasting messages. Each platform has a slightly different API, depending on the platform’s ...

Get Designing Bots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.