small medium large xlarge

Build Chatbot Interactions: Responsive, Intuitive Interfaces with Ruby

by

Cover image for Build Chatbot Interactions

Build Chatbot Interactions

Responsive, Intuitive Interfaces with Ruby

by

The next step in the evolution of user interfaces is here. Chatbots let your users interact with your service in their own natural language. Use free and open source tools along with Ruby to build creative, useful, and unexpected interactions for users. Take advantage of the Lita framework’s step-by-step implementation strategy to simplify bot development and testing. From novices to experts, chatbots are an area in which everyone can participate. Exercise your creativity by creating chatbot skills for communicating, information, and fun.

Customer Reviews

Effective teams automate their workflows, and chatbots are one of the best ways to capture and share repeated tasks. Daniel Pritchett is the perfect teacher to get you instantly productive creating chat-integrated automations.

- Avdi Grimm

Head Chef, RubyTapas.com

Daniel Pritchett’s Build Chatbot Interactions is a fantastic, comprehensive guide to getting started with programming your own Lita chatbot. It walks you through the basics of the Lita chatbot framework, how to get it up and running, and includes a wide variety of example applications. From interactions with remote APIs, to scheduled tasks, to rudimentary artificial intelligence, there are interesting and practical examples for everyone. You’ll be inspired to implement your own ideas, and the book will help you figure out how. This book should be your first step after you finish the software’s own documentation.

- Jimmy Cuadra

Creator, Lita.io

Every company I have worked at has used ChatOps as a team tradition to work together and be successful. Daniel lays down the foundation for how you can get started building and deploying your first Chatbot. He then walks you through several how-to examples that explain how you can use Chatbots to manage software systems, send sms/email, schedule tasks, and much more. I recommend you get started with Chatbots today!

- Tammy Bütow

Principal SRE, Gremlin

A delightfully comprehensive dive into the world of making chatbots. Great for hobbyists looking to pick up a new skill or professionals who want to build better tooling.

- Randall Koutnik

Senior Software Engineer, Slack

See All Reviews

Choose Your Format(s)

  • $37.95 In Stock

    Save $11.95 on the combo pack.

  • $29.95 In Stock
  • $19.95 In Stock
  • Ebooks are DRM free.

  • Ebook delivery options.

What You Need

You don’t need much to get started with chatbots. A Mac or Linux computer with a recent version of Ruby is recommended. Windows users can keep up with a free virtual machine running Linux. You’ll deploy your chatbots for free (or at least cheaply) on cloud hosting platforms like Heroku and Digital Ocean.

Contents & Extracts

  • Preface
    • Who Is This Book For?
    • What’s in This Book?
    • What You Need
    • Why Lita and Ruby?
    • Online Resources
    • Acknowledgements
  • Your First Lita Bot
    • Install Ruby
    • Install Shared Libraries and Redis
    • Use Redis as Lita’s “Brain”
    • Install the Lita Gem
    • Generate a New Lita Bot
    • Test the Bot Locally
    • Wrap-up
  • Your First Lita Skill
    • Generate an Empty Skill
    • Complete Your Skill and Write Some Unit Tests
    • Publish Your Skill for Others as a Ruby Gem
    • Wrap-up
  • Deploy Your Lita Bot to Heroku
    • Prepare a Heroku Home for Your Bot
    • Add-ons and Heroku’s Elements Marketplace
    • Wrap-up
  • Deploy Lita on Your Linux Server
    • Create a Cloud Virtual Machine
    • Review and Run the Bootstrap Script
    • Review Your Dockerized Bot through SSH
    • Wrap-up
  • Parse a Photoblog: What’s Brad Eating?
    • Build a Web Page Scraper Skill
    • Set Up a Matcher
    • Download the Raw HTML with Tumblr
    • Parse the Raw HTML with Nokogiri
    • Isolate the First Post with a CSS Selector
    • Find the Image with Another CSS Selector
    • Format the Results to Share with the End User
    • Wrap-up
  • Meetup Finder
    • Set Up a Meetup.com Account and API Key
    • Connect to the Meetup API Using the Meetup Client Gem
    • Teach Lita How to Query the Meetup API
    • Test Your MeetupFinder Class
    • Model the API Response with a Plain Old Ruby Object
    • Wrap-up
  • Imgflip Meme Maker
    • Make an Image Macro
    • Teach Lita How to Generate Memes
    • Expand the Skill to Support More than One Meme
    • Enable Users to Add Memes to Your Gem
    • Wrap-up
  • Bot Task Scheduler excerpt
    • Capture a Lita Command to Reuse Later
    • Resubmit a Deferred Lita Command
    • Store Scheduled Tasks in Redis
    • Wrap-up
  • Hide Walls of Text Behind an Offsite URL
    • Create a Lita Extension to Send Text to the Pastebin API
    • Make a Simple Lita Handler Skill to Use as a Test Driver
    • Wrap-up
  • Use a Markov Chain or Cleverbot
    • Markov Chain: Train Lita to Speak in Someone Else’s Voice
    • Cleverbot: Use an External AI for Difficult Questions
    • Wrap-up
  • Send Messages with SMS and Email excerpt
    • Use Twilio to Send Text Messages
    • Use SMTP to Send an Email
    • Wrap-up
  • ChatOps Techniques for Managing Software Systems
    • Create a Mini-skill to Check Installed Version
    • Test the Command Executor
    • Ask Lita to Ship a New Software Release
    • Wrap-up
  • Amazon Alexa Integrations
    • Hardware, Simulators, and Alexa Portal Access
    • Register for an Alexa Developer Account
    • Create Your First Skill on the Portal
    • Serve Up a “Flash Briefing” Newsfeed for Echo Devices
    • Record Messages with a Companion Alexa Skill
    • Build Out a Lita Skill to Take in Messages from Alexa
    • Wrap-up
  • Hue Programmable Lighting
    • Connect a Hue Bridge to Your Computer
    • Build a Simple Wrapper for Managing a Bulb
    • Control Your Bulbs from Lita
    • Wrap-up

Author

Daniel Pritchett is a consulting programmer, speaker, and user group supporter in Memphis, Tennessee. He builds infrastructure tooling for internet companies. If it’s interesting and useful, Daniel wants to help you build it.