Webority.Chat.Ai
0.137.2
dotnet add package Webority.Chat.Ai --version 0.137.2
NuGet\Install-Package Webority.Chat.Ai -Version 0.137.2
<PackageReference Include="Webority.Chat.Ai" Version="0.137.2" />
<PackageVersion Include="Webority.Chat.Ai" Version="0.137.2" />
<PackageReference Include="Webority.Chat.Ai" />
paket add Webority.Chat.Ai --version 0.137.2
#r "nuget: Webority.Chat.Ai, 0.137.2"
#:package Webority.Chat.Ai@0.137.2
#addin nuget:?package=Webority.Chat.Ai&version=0.137.2
#tool nuget:?package=Webority.Chat.Ai&version=0.137.2
webority-chat
Conversational component for assistant, support and sales chats: engine, React, Razor and React Native screens, server and admin.
Packages
| Package | Registry | What it holds |
|---|---|---|
@webority/chat-core |
npm | The headless engine: client over the chat routes, session state machine over message parts, stream reader, profile resolution, default labels, fixture client. |
@webority/chat-elements |
npm | <wui-chat> and one element per part kind, the chat styles on @webority/theme tokens, the chat.global.js bundle for Razor pages. |
@webority/chat-react |
npm | The React shells (launcher, docked, full page, embedded), thread, composer, one renderer per part kind and useChat. |
@webority/mobile-chat |
npm | The React Native screen, sheet and embedded shells, renderers and useChat. ChatSheet is a floating launcher that opens the chat in a bottom sheet at 92% of the screen height (snapPoints), closed by a pull down or a tap on the backdrop. |
Webority.Chat |
NuGet | The conversation core: entities, contract records, store, profiles, scripts, inputs, ledger rules, visitors, package-owned schema. |
Webority.Chat.AspNetCore |
NuGet | MapWeborityChat(prefix, options): every route, the SSE writer, the feature filter, the captcha gate. |
Webority.Chat.Ai |
NuGet | The AI responder over Webority.Ai: agent loop, reply guard, presentation tools, guardrails. |
Webority.Chat.Support |
NuGet | Handoff to a person, ticket and handoff parts, open tickets on start, away notices. It serves no page, so a customer head takes it safely. |
Webority.Chat.Support.Admin |
NuGet | The live agent console at /ChatSupport/Live, for the staff head only. |
Webority.Chat.Speech |
NuGet | Azure Speech tokens for dictation and read-aloud. |
Webority.Chat.Sms.Azure |
NuGet | Sends phone one-time codes through Azure Communication Services SMS over managed identity. |
Webority.Chat.Razor |
NuGet | The app-chat tag helper and the chat-elements assets. |
Webority.Chat.Admin |
NuGet | Transcripts, ratings, unanswered questions, leads, profile and script editors. |
Every package carries the one version in version.json.
Voice clips are players of stored clips only: the chat plays a clip that is already stored and does not record one.
A phone app that turns on Dictation or VoiceClips adds expo-audio's config plugin to its own app config, with the microphone permission text (Android RECORD_AUDIO), and ships a new store build.
Server wiring
services.AddWeborityChat<AppDbContext>()
.SeedProfile("website", "chat/profile.website.json")
.AddLeadSink<WebsiteLeadSink>();
// OnModelCreating: modelBuilder.ApplyWeborityChatConfiguration();
app.MapWeborityChat("/api/chat", new ChatMapOptions { Surface = "website" });
AddWeborityChat sends one-time codes by email, so every host registers Webority.Email, and adds the code template with AddWeborityChatOtpEmailTemplates() on its email builder. A host with lead capture also adds AddWeborityChatSalesEmailTemplates(), the template of the sales email sent to Chat:SalesNotificationEmail for each new lead.
Booking needs the host's IChatBookingSlots and IChatBookingSink, registered before or after AddWeborityChat. A chat whose profile turns booking on logs an error naming the missing seam when either is not registered, and the visitor sees the assistant-unavailable message.
AI replies: services.AddWeborityChatAi(surface, options) screens each message through an AI judge, so the host also registers one, for example AddWeborityAiJudgmentJev() with its key; startup fails without it. The four judgment uses (chat-injection, chat-topic, chat-sentiment, chat-repeat) default to the Jev provider (ChatAiUseDefaults); an Ai:Judgment:Uses entry overrides one.
Captcha: services.AddWeborityChatCaptcha() adds the gate over the host's ICaptchaVerifier (Webority.Security), and the browser receives that verifier's site key, so one stored profile works in every environment. A surface whose profile sets a captcha mode other than Off fails each turn with an error when the host never calls it.
The tables and their numbered migrations ship inside the Webority.Chat package under content/schema.
Admin pages: services.AddRazorPages().AddWeborityChatAdmin("ChatAdmin", leadUrlTemplate: "/Sales/Leads/{lead}", articleSuggestionUrlTemplate: "/Support/HelpCentre/New?question={question}&source={surface}"). The lead template holds {lead} once; the article template holds {question} once and {surface} at most once, and the Unanswered page shows "Suggest an article" only when it is set. Both are optional, and both start with https:// or a single /.
The transcript list is /Chat/Transcripts. Its scope query value, /Chat/Transcripts?scope=<scope key>, shows only the conversations stored under that scope key, matched exactly; the page shows the active scope with a Clear scope link.
Support wiring
Webority.Chat.Support adds handoff to a person, the agent console and away notices. Register it after AddWeborityChat and after the support builder's head call: AddCustomerService() on the customer head, AddAgentService() on the admin head, AddSystemService() on a background worker head.
// Customer head
var support = services.AddWeboritySupport<AppDbContext>().AddCustomerService().AddCustomerSuggestions();
services.AddWeborityAiActions<AppDbContext>(configuration);
support.AddChatTools();
services.AddWeborityChat<AppDbContext>();
services.AddWeborityChatSupport();
// OnModelCreating: modelBuilder.ApplyChatSupportConfiguration();
app.MapWeborityChat("/api/chat", new ChatMapOptions { Surface = "website" }).MapWeborityChatSupport(options);
// Admin head (also references Webority.Chat.Support.Admin)
var mvc = services.AddRazorPages();
services.AddWeboritySupport<AppDbContext>().AddAgentService();
mvc.AddWeborityChatSupportAdmin(agentPolicy);
Staff pages live only in Webority.Chat.Admin and Webority.Chat.Support.Admin. A customer or public head references neither.
Every head that calls AddWeborityChatSupport calls AddChatAwayOutbox() on the AddWeborityOutbox builder, and sets Chat:Away:ConversationUrlTemplate to an absolute https URL containing {conversationId} when it sets the key. Startup fails otherwise.
- The host lists
SupportTicketRaiseinAi:Actions:KindswithModeConfirm, and gives it a profile action cap (ChatActionCap: kind, max, window hours). The hand-off raises its ticket through that ledger entry. Chat:SupportbindsChatSupportOptions(wait, idle, agent capacity, presence, typing and stream timings, with their ranges).Chat:Awaybinds the away notice options (docs/away-notices.md).- A product timer calls
ChatHandoffDeadlines.RunAsynconce a minute. It ends a hand-off nobody took withinMaxWaitMinutes. - The
ChatHandofftable and its numbered migration ship inside theWebority.Chat.Supportpackage undercontent/schema, and run after theWebority.Chatbaseline. - Away notices need the host's
IChatPushDeviceswhen the recipient has devices, and a one-minute outbox processor for thechat-awayqueue. Seedocs/away-notices.md. - The customer head calls
AddWeborityChatOtpEmailTemplates()on its email builder for the visitor's one-time code (see Server wiring).
Visitors. A visitor's hand-off needs a confirmed email. When none exists, the hand-off asks for a name and an email, confirmed with a one-time code, and answers ChatHandoffStatus.ContactRequested until the contact is confirmed. The ticket is raised as a support contact (realm Contact), and staff see it only then. A host registers no IChatNotificationRecipients class unless it has devices. The customer head still registers ISupportCustomerContext for signed-in users, and it may throw for a public head with none.
Develop
corepack pnpm install --frozen-lockfile
corepack pnpm -r build
dotnet build Webority.Chat.slnx -v q --nologo -m:4
dotnet test --solution Webority.Chat.slnx --no-build
Two samples run the library locally:
samples/FullStack.Hostruns the whole chat on one machine: the real routes, a SQL Server database, the staff pages and a stand-in model with no network. Start with itsREADME.md.samples/Razor.Sandboxis the database-free catalogue of the Razor chat, which the parity gate boots.
See CLAUDE.md for the repo rules.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Azure.Identity (>= 1.21.0)
- Microsoft.Agents.AI (>= 1.22.0)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.13)
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Http.Resilience (>= 10.11.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.13)
- Webority.Ads (>= 0.14.7)
- Webority.Ai (>= 0.41.0)
- Webority.Ai.Actions (>= 0.41.0)
- Webority.Ai.Judgment (>= 0.41.0)
- Webority.Ai.Knowledge (>= 0.41.0)
- Webority.Analytics (>= 0.35.0)
- Webority.Azure.Storage (>= 0.35.0)
- Webority.Chat (>= 0.137.2)
- Webority.Delivery.EntityFrameworkCore (>= 0.36.0)
- Webority.Domain.Abstractions (>= 0.6.1)
- Webority.Email (>= 0.77.7)
- Webority.Email.Razor (>= 0.77.7)
- Webority.Security.AspNetCore (>= 0.54.4)
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.137.2 | 0 | 11/6/2026 |
| 0.137.1 | 0 | 11/6/2026 |
| 0.137.0 | 0 | 11/6/2026 |
| 0.136.0 | 0 | 11/6/2026 |
| 0.135.1 | 33 | 11/6/2026 |
| 0.135.0 | 51 | 11/6/2026 |
| 0.134.0 | 75 | 11/5/2026 |
| 0.133.0 | 52 | 11/5/2026 |
| 0.132.3 | 69 | 11/5/2026 |
| 0.132.2 | 48 | 11/5/2026 |
| 0.132.1 | 55 | 11/4/2026 |
| 0.132.0 | 48 | 11/4/2026 |
| 0.131.0 | 54 | 11/4/2026 |
| 0.130.2 | 50 | 11/4/2026 |
| 0.130.1 | 51 | 11/4/2026 |
| 0.129.0 | 63 | 11/4/2026 |