Skip to content

Demo showing how to use Redis Agent Memory Server to build context-aware AI chatbots with persistent conversation memory on Azure.

License

Notifications You must be signed in to change notification settings

redis-developer/podcast-chatbot-with-agent-memory-azure-demo

Repository files navigation

Podcast Chatbot with Agent Memory and Azure

Overview

The Podcast Chatbot—or Podbot for short—demonstrates how Redis Agent Memory Server enables intelligent, context-aware AI chatbots with persistent conversation memory. Built on Azure using Static Web Apps, Functions, and OpenAI, this demo showcases Redis's ability to manage short- and long-term conversation context and provide multi-session support for AI applications.

Table of Contents

Demo Objectives

  • Highlight Redis Agent Memory Server (AMS) to manage short- and long-term memory for AI workflows.
  • Demonstrate integration of AMS with Azure including Static Web Apps, Functions, and Azure Managed Redis.
  • Show LiteLLM as a proxy for Azure OpenAI API access.

Setup

Dependencies

For Local Development:

For Azure Deployment:

Configuration

Local Configuration:

Copy .env.example to .env and fill in your OpenAI API key.

cp .env.example .env

If you use Node Version Manager run:

nvm use

Install Node.js dependencies:

npm install

Azure Configuration:

No configuration necessary.

Running the Demo

Running Locally:

In one terminal window start the Docker services for Redis, AMS, and LiteLLM:

docker compose up

In another terminal window, start the development servers:

npm run dev

This will compile and start the application. Now, just naviagate to http://localhost:4280 in your browser and start using Podbot.

Running on Azure:

azd up

Navigate to the URL provided by the azd up command in your browser and start using Podbot.

Using the Demo

Login: Enter a username and password. Click "Login" or just hit enter. Any username will work but the password must be "password".

Sessions: The app will automatically create a session for you. If there are existing sessions, you will be added to the most recently used one. If you want to start a new session, click the "New Session" button. If you want to switch sessions, just click on the one you want.

Chatting: Ask about podcasts in the textbox at the bottom. Responses will show up in the main panel. If you have navigated away from the chat view, you can return to it by clicking the "Chat" icon at the top.

Working Memory: Working Memory is accessed via the "Note" icon at the top. When selected, the main panel shows the compacted summary of older messages and recent conversation history that Podbot is using to generate responses. Working Memory will change if you switch sessions or ask Podbot more questions.

Long-term Memory: Long-term Memory is accessed via the "Brain" icon at the top. This panel shows the memories that Podbot has extracted from all of your conversations and stored for future reference. Long-term Memory will change if you switch users.

Logout Click the "Logout" icon in the top right corner. This will return you to the login screen. All sessions and memory will be saved in Redis for later.

Stopping the Demo

Running Locally:

Just hit Ctrl+C in the terminal windows where you ran npm run dev and docker compose up respectively.

Running on Azure:

azd down --purge

Note that this will delete all resources, including the Redis database. All data will be lost.

Slide Deck

📑 Podcast Chatbot with Agent Memory and Azure Covers goals, architecture overview, key Redis features, lessons learned, and positible enhancements.

Architecture

Architecture Diagram

The Svelte 5 + Tailwind CSS frontend is hosted on Azure Static Web Apps and sends user requests to a collection of Azure Functions written in TypeScript. These functions use Azure OpenAI (via the LiteLLM proxy), Redis, and Redis Agent Memory Server to service those requests. AMS manages the conversation history—automatically summarizing older messages, extracting long-term memories using Azure OpenAI (again, via LiteLLM), and storing it all in Redis.

Known Issues

  • None at this time.

Resources

Maintainers

Maintainers:

License

This project is licensed under the MIT License.

About

Demo showing how to use Redis Agent Memory Server to build context-aware AI chatbots with persistent conversation memory on Azure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published