Bots I Have Built


tags: AWS, chatbots, Lambda, serverless
created: Mon 26 February 2018; status: published;


I have been building chatbots for a few years and thought I would document some of them and their evolution over time.

TYMS (Track Your Mental State)

  • TYMS v1 - Built with bottle.py, saved to CSV file
  • TYMS v2 - Django, running on Heroku. Used an event-queue style where incoming SMS were saved and triggered bot logic in a Celery queue.
  • TYMS v3 - Django using Channels, running on Heroku
    • This was Channels 1.0, so this required an extra server, making 3. So this was $22/month, for no good reason.
  • TYMS v4 - Used PullString's then-awesome bot-builder with some webhook extensions for the more complex logic. However, PullString pivoted and shut down their platform.
  • TYMS v5 - Ripped Channels back out
  • TYMS v6 - Now running on my bot platform on AWS Lambda and DynamoDB (using PynamoDB ORM wrapper)

Motivation Bot

Used AWS Chalice to build Lambda function and simple DynamoDB interactions. It sends a text every morning saying "How do you plan to be better today than yesterday?". If you reply, in early afternoon it texts "You were going to {your message}. Are you? Get to it!"

I submitted a pull request for scheduled events via CloudWatch but ultimately the core team implemented the feature differently. Worked well for me, though.

Why Get Up?

Used Apex to manage Lambda function. Sent evening message asking "Why should you get up in the morning?" In the morning, it called your phone and used AWS Polly to read your reasons aloud. Becomes nighttime me is often more motivated than morning me.

Also built a Tasker rule to download the audio as mp3 and play it, like an alarm clock. I wanted to build an app around this, but haven't yet.

Platforms Used

Commercial platforms I have used: PullString Author, Motion.ai, Wit.ai, Init.ai

Self-built platforms I have used: Django, Chalice, Apex, Serverless, raw Lambda, Bottle.py