devexpress/agent-skills/devexpress-blazor-ai-chat
Claude Code and agent skill by devexpress/agent-skills
- community
- ext:[{"type":"template","description":"Custom templates for code generation"}]
Checking that the SKILL.md file is still in the repository.
Generate and configure DevExpress Blazor AI Chat (DxAIChat) — an AI-powered chat UI for Blazor apps. Use for building conversational assistants, integrating providers (OpenAI, Azure OpenAI, Ollama, or custom), configuring system prompts and suggestions, streaming responses, attachments, Markdown rendering, and tool/function calling via custom IChatResponseProvider implementations. Also use for DxAIChat, AI chat component, LLM chat UI, OpenAI setup, and chat architecture comparisons or migration scenarios.
Install
npx vskill@latest install devexpress/agent-skills/devexpress-blazor-ai-chatSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
DevExpress Blazor AI Chat
DxAIChat is an AI-powered conversational UI component compatible with major cloud AI providers (OpenAI, Azure OpenAI) and self-hosted models (Ollama). It runs in Blazor, .NET MAUI, WPF, and WinForms applications. The component operates on a BYOK (bring your own key) model — you supply the AI provider credentials; DevExpress does not bundle any LLM.
Security: Never hardcode AI provider keys, endpoints, or credentials in source code. Use environment variables, user secrets, or a secrets vault.
When to Use This Skill
- Add a conversational AI chat widget to a Blazor page
- Connect
DxAIChatto Azure OpenAI, OpenAI, or Ollama - Configure prompt suggestions (hint bubbles shown before the first message)
- Add a system prompt to give the AI model a persona or instructions
- Enable file attachments (PDF, images) for multimodal AI analysis
- Render AI responses with Markdown formatting
- Switch between multiple AI providers at runtime
- Implement tool/function calling from the AI model
- Save and load conversation history
- Integrate with AI agents and custom backends via
IChatResponseProvider
Prerequisites & Installation
NuGet Packages
| Package | Minimum Version | Purpose | |
|---|---|---|---|
DevExpress.AIIntegration.Blazor.Chat | 26.1 | Core AI Chat component | |
DevExpress.Blazor | 26.1 | Required DevExpress Blazor base | |
DevExpress.AIIntegration.Agents | 26.1 | Agent-based IChatResponseProvider creation (.AsAIAgent()) | |
Microsoft.Extensions.AI | 9.7.1 | Required MEI abstraction layer | |
Microsoft.Extensions.AI.OpenAI | 9.7.1-preview.1.25365.4 | Azure OpenAI / OpenAI provider bridge | |
Azure.AI.OpenAI | 2.3.0 | Azure OpenAI SDK | |
OpenAI | 2.3.0 | OpenAI (non-Azure) SDK | |
OllamaSharp | — | Ollama self-hosted provider |
Important: Always use version 26.1 or later. IChatResponseProvider and .AsIChatResponseProvider() are not available in 25.2 or earlier. All DevExpress packages must use the same version. A valid DevExpress license is required.
Namespace Quick Reference
Use this table to resolve using directives without searching — copy the exact namespace for each type:
| Type / Extension | Namespace | |
|---|---|---|
DxAIChat, DxAIChatPromptSuggestion, DxAIChatFileUploadSettings, BlazorChatMessage, IAIChat, AIChatResource, IAIChatMessageContextItem | DevExpress.AIIntegration.Blazor.Chat | |
IChatResponseProvider, .AsIChatResponseProvider(), .AsIChatResponseProvider(ChatOptions) | DevExpress.AIIntegration.Chat | |
.AsAIAgent(instructions:) | DevExpress.AIIntegration.Agents | |
DxResourceManager, Themes, SizeMode | DevExpress.Blazor | |
IChatClient, ChatRole | Microsoft.Extensions.AI | |
AzureOpenAIClient | Azure.AI.OpenAI | |
ApiKeyCredential | System.ClientModel | |
OpenAIClient | OpenAI | |
AddDevExpressBlazor, AddDevExpressAI | Extension methods — no explicit using needed; resolved from installed NuGet packages |
Required Registration (all three steps must be present)
Program.cs — register the AI provider, then DevExpress services (see BYOK Setup Guide below for provider details):
v26.1 note:DevExpress.Blazorno longer includesoptions.BootstrapVersionorDevExpress.Blazor.BootstrapVersion. Do not generate either API.
Keyed providers only: For multi-provider (runtime-switching) setups, skipAddChatClientand register each provider explicitly:builder.Services.AddKeyedScoped<IChatResponseProvider>("key", (_, _) => client.AsIChatResponseProvider()).
Components/App.razor — register theme and client scripts inside <head>:
Without these two calls components render without styles and client interactivity is broken.
Components/_Imports.razor — add global namespace:
Before You Start — Ask the Developer
If the host agent has a structured question-asking tool available, use it to ask these questions one at a time with clear options — for example, Claude Code's AskUserQuestion tool or GitHub Copilot's askQuestions tool. If no such tool is available, ask the questions directly in the chat response before generating code.
- Render mode: What is your render mode? (
InteractiveServer,InteractiveWebAssembly, orInteractiveAuto) - New or existing project?
- AI provider: Azure OpenAI, OpenAI, Ollama, Google Gemini, or custom?
- If Ollama: What model name do you want to use? (e.g.,
llama3,phi4,mistral,gemma) — runollama listto see installed models. - Key features needed: Prompt suggestions? File attachments? System prompt? Markdown rendering? Tool calling?
- Secrets management: How are API keys stored? (environment variables, user secrets, Azure Key Vault)
Rule: Do not hardcode AI credentials. Confirm secret management before generating Program.cs code.
BYOK Setup Guide
DxAIChat is a Bring Your Own Key (BYOK) component — DevExpress does not supply AI models, API keys, or endpoints. The developer must provision an AI provider and configure credentials before any code will work.
Agent instruction: When the user picks an AI provider (question 3) or a secret storage approach (question 5) from the section above, immediately present the matching rows from the tables below. Do not skip to code generation until the user confirms their credentials are in place.
Required Credentials by Provider
| Provider | Required Values | Where to Obtain | |
|---|---|---|---|
| Azure OpenAI | Endpoint URL · API key · Deployment name | Azure Portal → your Azure OpenAI resource → Keys and Endpoint; deployment name from Azure OpenAI Studio | |
| OpenAI | API key | platform.openai.com → API keys | |
| Ollama (self-hosted) | Server URL (default http://localhost:11434) · Model name | No cloud account needed — install Ollama locally and pull a model (see below) | |
| Google Gemini | API key | Google AI Studio → Get API key | |
| Custom provider | Provider-specific | Implement IChatResponseProvider manually |
Azure OpenAI — three values are required:
OpenAI — one value required:
The model name (e.g., "gpt-4o") is set in Program.cs code directly, not stored as a secret.
Ollama — local system setup, no cloud account:
Agent instruction: Before generating Ollama registration code, ask the developer which model they want to use. Declare the client asIChatClient(notvar) so.AsIChatResponseProvider()resolves:IChatClient ollamaClient = new OllamaApiClient(url, "<model-name>");— do not hardcode"llama3"as a default.
Secret Storage — What to Configure
| Approach | Recommended for | What to do | |
|---|---|---|---|
| User secrets | Local development | Run dotnet user-secrets commands once per project (see below) | |
| Environment variables | CI/CD pipelines, containers, PaaS hosting | Set variables in the OS, Docker environment, or hosting platform config | |
| Azure Key Vault | Production Azure deployments | Add Azure.Extensions.AspNetCore.Configuration.Secrets package; configure vault URI in Program.cs | |
| appsettings.json overrides | Deploy-time injection only | Leave placeholder values in the file; supply real values via environment variable overrides at deploy time — never commit real keys |
User secrets — run once per project in the project folder:
Secrets are stored in %APPDATA%\Microsoft\UserSecrets\<project-guid>\secrets.json and are never committed to source control.
Environment variables — read in Program.cs:
Azure Key Vault — add to Program.cs before building services:
Component Overview
DxAIChat provides:
- Conversational UI: Full message history, user/AI message rendering, typing indicator (
DxAIChat) - Prompt suggestions: Pre-defined hint bubbles for first-message guidance (
DxAIChatPromptSuggestion) - File attachments: Upload PDFs and images for multimodal AI analysis (
DxAIChatFileUploadSettings) - Initialization hook: Run setup code (system prompt, assistant binding) via the
Initializedevent (IAIChat) - Multi-provider support: Switch providers at runtime using
ChatResponseProviderServiceKey
Core Entry Point
Minimal Razor markup:
Minimal Program.cs (Azure OpenAI):
Version requirement:IChatResponseProviderand the.AsIChatResponseProvider()extension method are available starting from DevExpress v26.1. Earlier versions use a different integration API.
Documentation & Navigation Guide
Getting Started
📄 references/getting-started.md
When you need to:
- Install packages and register an AI provider in Program.cs
- Add
DxAIChatto a Blazor page with the correct render mode - See a complete working project setup
AI Service Integration
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/dx-blazor/skills/devexpress-blazor-ai-chat/SKILL.md
Popularity
- Repository stars
- 52
- Repository forks
- 8
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
templateCustom templates for code generation
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/devexpress/agent-skills/devexpress-blazor-ai-chat)