What is Alexa?
Alexa is a virtual personal assistant from Amazon. Similar in spirit to offerings from Apple (Siri), Microsoft (Cortana) and Google (Assistant), you can speak to these personal assistants and ask them to read the weather report, play a song or tell you a joke.
What truly sets Amazon's Alexa apart from the other personal assistants, however, is that it provides an API that programmers (like us) can use to define new skills for Alexa — teaching it new tricks.
A New Trick: "Ask Finite Wisdom"
Finite Wisdom has developed a new skill for Alexa that allows it to connect to Harvest, the time tracking application that we use to track the number of hours we bill each day to each of our clients. With this new skill in place, one of our clients can have a conversation like the following with Alexa:
- Alexa, what time is it?
- Alexa, what's the weather going to be today?
- Alexa, talk to Finite Wisdom
- Which client would you like to discuss?
- ACME Industries
- What is the authorization code for ACME Industries?
- (authorization code)
- What can I tell you about the hours that Finite Wisdom has billed to ACME Industries?
- How many hours did they bill last week?
- How many hours did they bill last month?
- How about last year?
- That's all for Finite Wisdom
- Alexa, open Pandora please
It is important to realize that the answers to the "how many hours did you bill" questions are determined on the fly by connecting to Harvest and performing the appropriate calculation. If one had asked the question "how many hours did you bill today", then the answer would change as the day progressed!
Lastly, our new skill will generate what is known as skill cards. A card is a written version of the answers that the skill generated so that you can go back and review them at any time. The cards appear appear in Alexa's companion app. The app is available for for iOS, Android and the web.
How can I see this in action?
Well, if you've got an Amazon Echo of your own, you can try it yourself. If not, then watch the video of the exact conversation listed above, along with Alexa's answers to each question.
Try it yourself
Watch the video
What technologies were used to build this skill?
The Alexa Skills Kit (ASK) is a software development kit (SDK) provided by Amazon that provides you with the building blocks necessary to build an Alexa Skill. Although you can build a skill in almost any programming language that can publish a web API, Amazon has provided several thoroughly documented sample skills written in Node.js that help you get up and running quickly.
AWS Lambda is one of the Amazon Web Services. I think it would be best to rely on Amazon's own definition here: "AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability." That is pretty nifty, if you ask me. For the curious, the name "lambda" is a synonym for anonymous functions in computer programming, and more generally refers to lambda calculus in mathematics.
Harvest is a time tracking application used by over 40,000 companies including Finite Wisdom. We use it to track the number of hours we bill each day to each of our clients. Harvest provides an API that one can use to retrieve this information and present it on your own website or web application, or in this case - an Alexa skill!