Photo by AbsolutVision on Unsplash

Remembering Info Across Alexa Sessions with Persistent Attributes

An Alexa Skill Building Video Tutorial

Craig Walls
2 min readJul 21, 2022

--

https://pragprog.com/newsletter/

Imagine having a conversation with a friend and telling them some significant piece of information — such as your favorite drink — only to have them ask you about it again the next time you chat with them. And imagine that, in fact, they ask you about that same detail of your life every single time you get together.

It might not be that hard to imagine, especially if you know someone whose memory is not so good. It would be nice if your friend could remember your favorite drink, phone number, birthday, and other details so that you don’t have to tell them again.

When speaking with Alexa, it is helpful to have her store certain pieces of information for later use in future conversations. That way, she doesn’t have to ask you for the same information in subsequent sessions.

In this video, I show how to add cross-session memory to your Alexa skills using persistent attributes. With persistent attributes, your skill can stow any information that might be useful later in a DynamoDB table, and can then recall that information when it’s needed.

If you enjoyed this post, you might also enjoy Build Talking Apps for Alexa by Craig Walls, now available in beta from The Pragmatic Bookshelf:

In honor of the Alexa Live 2022 event, you can use promo code ALEXALIVE2022 at checkout to save 35% on the ebook through July 22nd.

--

--