Implements Redis-based state storage for Microsoft Bot Framework V4 (botbuilder-js), enabling scalable, persistent bot state management. Version 1.1.2 is current, with a stable API and no recent updates. Key differentiator: provides TTL-based automatic expiration for conversation state, unlike the built-in memory store. Requires Node.js 12+ and a Redis server. Supports both CommonJS and ESM usage.
npm install botbuilder-storage-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Redis client with optional prefix and TTL, then configures a BotFramework bot to use it for state storage.
Either disable TTL (omit the second argument) or implement custom logic to extend TTL on each interaction.
Use `redis` v3.x explicitly, or adapt to v4+ by using an adapter. Check `redis` migration guide.
For new bots, consider using `botbuilder-azure` or custom storage adapter with `botbuilder-dialogs`.
Attach event listeners to `redisClient` for 'error' and 'ready' and manage connection lifecycle externally.
Downgrade to `npm install redis@3.1.2` or compatible version that uses callback-based API.
Use: const { RedisDbStorage } = require('botbuilder-storage-redis');Set a unique `prefix` in redisOptions to avoid clashes, or clear conflicting keys.