BotWire.Redis 0.4.0

dotnet add package BotWire.Redis --version 0.4.0
                    
NuGet\Install-Package BotWire.Redis -Version 0.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BotWire.Redis" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BotWire.Redis" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="BotWire.Redis" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BotWire.Redis --version 0.4.0
                    
#r "nuget: BotWire.Redis, 0.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BotWire.Redis@0.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BotWire.Redis&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=BotWire.Redis&version=0.4.0
                    
Install as a Cake Tool

BotWire.Redis

Redis-backed session store and distributed rate-limit counters for BotWire — multi-container support in one line.

By default BotWire keeps conversation sessions and rate-limit counters in process memory, which breaks behind a load balancer: a request routed to a different instance loses the session, and every limit is multiplied by the replica count. This package moves both into Redis so they are shared across all instances and survive restarts.

One line to enable it

builder.Services.AddBotWire(opts =>
{
    opts.TopicDescription = "Online store customer support";
    opts.Documents        = ["docs/faq.md"];
    opts.ChatProvider     = new OpenAIProviderOptions { ApiKey = "sk-...", Model = "gpt-4o-mini" };
})
.AddBotWireRedis("localhost:6379");   // registers a shared multiplexer + both Redis stores

app.MapBotWire();

Call it after AddBotWire(...). Without it, BotWire behaves exactly as before (in-memory stores, per-process counters) — adding the package changes nothing until you call AddBotWireRedis.

What you get

  • Shared conversation sessions. Stored as JSON with a sliding TTL equal to SessionTtl; history survives an instance restart or load-balancer bounce.
  • Distributed rate limiting. MaxMessagesPerMinute, MaxSessionsPerIpPerHour, and DailyTokenBudget use atomic Redis counters, so N instances enforce one shared limit instead of N×. The daily-budget key resets at UTC midnight.
  • No Core coupling. Implemented behind IRateLimitStore / IConversationStore; BotWire.Core takes no Redis dependency.

MaxConcurrentSessions stays per-container by design (a distributed semaphore leaks permits on container crashes).

Requirements

  • A reachable Redis instance (any standard StackExchange.Redis connection string).
  • BotWire.AspNetCore (or BotWire.Core) — this package extends an existing BotWire setup.

License

AGPL-3.0-or-later. Commercial licenses available for proprietary use.

📖 Full docs and a multi-instance sample: https://github.com/adamy/BotWire

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 108 6/26/2026
0.3.0 114 6/17/2026