CodeDesignPlus.Net.AI
1.0.0-beta.13622
This is a prerelease version of CodeDesignPlus.Net.AI.
dotnet add package CodeDesignPlus.Net.AI --version 1.0.0-beta.13622
NuGet\Install-Package CodeDesignPlus.Net.AI -Version 1.0.0-beta.13622
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.
For projects that support PackageReference, copy this XML node into the project file to reference the package.
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 CodeDesignPlus.Net.AI --version 1.0.0-beta.13622
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeDesignPlus.Net.AI, 1.0.0-beta.13622"
#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 CodeDesignPlus.Net.AI@1.0.0-beta.13622
#: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=CodeDesignPlus.Net.AI&version=1.0.0-beta.13622&prerelease
#tool nuget:?package=CodeDesignPlus.Net.AI&version=1.0.0-beta.13622&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodeDesignPlus.Net.AI
Overview
CodeDesignPlus.Net.AI provides a unified interface for integrating AI/LLM providers (Claude, OpenAI, Azure OpenAI) into .NET microservices. It supports configurable agents with system prompts, model selection, and provider routing via appsettings.json.
Features
- Multi-Provider Support: Claude (Anthropic), OpenAI, and Azure OpenAI out of the box
- Agent Configuration: Define named agents with system prompts, temperature, max tokens, and provider selection
- Provider Abstraction:
IAIProviderinterface allows custom provider implementations - Options Pattern: Standard .NET configuration via
appsettings.jsonwith validation - Dependency Injection:
services.AddAI(configuration)registers all services
Installation
dotnet add package CodeDesignPlus.Net.AI
Configuration
{
"AI": {
"DefaultProvider": "Claude",
"Providers": {
"Claude": {
"ApiKey": "sk-ant-...",
"Model": "claude-sonnet-4-5-20250514"
},
"OpenAI": {
"ApiKey": "sk-...",
"Model": "gpt-4o"
},
"AzureOpenAI": {
"ApiKey": "...",
"Model": "gpt-4o",
"Endpoint": "https://your-resource.openai.azure.com/"
}
},
"Agents": {
"EmailDesigner": {
"Provider": "Claude",
"SystemPrompt": "You are an expert HTML email template designer...",
"MaxTokens": 4096,
"Temperature": 0.7
}
}
}
}
Usage
Registration
// In Startup.cs or Program.cs
services.AddAI(configuration);
Consuming the Service
public class MyCommandHandler(IAIService ai) : IRequestHandler
{
public async Task Handle(MyCommand request, CancellationToken cancellationToken)
{
var response = await ai.ChatAsync("EmailDesigner", "Create a welcome email template", cancellationToken);
if (response.Success)
{
// Use response.Content (the AI-generated text/HTML)
}
}
}
Multi-turn Conversations
var messages = new List
{
new(ChatRole.User, "Create a purchase receipt email"),
new(ChatRole.Assistant, "..."),
new(ChatRole.User, "Change the header color to blue"),
};
var response = await ai.ChatAsync("EmailDesigner", messages, cancellationToken);
Architecture
IAIService (main entry point)
↓
AIService (orchestrator - resolves agent config + provider)
├── ClaudeProvider (Anthropic SDK)
├── OpenAIProvider (OpenAI SDK)
└── AzureOpenAIProvider (Azure.AI.OpenAI SDK)
Documentation
For more information, visit https://doc.codedesignplus.com
License
This project is licensed under the GNU Lesser General Public License v3.0. See LICENSE.md for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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 was computed. 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.
-
net9.0
- Anthropic.SDK (>= 3.2.2)
- Azure.AI.DocumentIntelligence (>= 1.0.0)
- Azure.AI.OpenAI (>= 2.1.0)
- CodeDesignPlus.Net.AI.Abstractions (>= 1.0.0-beta.13622)
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 9.0.0)
- OpenAI (>= 2.1.0)
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 |
|---|---|---|
| 1.0.0-beta.13622 | 0 | 10/6/2026 |
| 1.0.0-beta.13614 | 0 | 10/6/2026 |
| 1.0.0-beta.13605 | 48 | 10/5/2026 |
| 1.0.0-beta.13603 | 39 | 10/5/2026 |
| 1.0.0-beta.13598 | 41 | 10/5/2026 |
| 1.0.0-beta.13592 | 51 | 10/4/2026 |
| 1.0.0-beta.13584 | 60 | 10/3/2026 |
| 1.0.0-beta.13582 | 61 | 10/2/2026 |
| 1.0.0-beta.13576 | 49 | 10/2/2026 |
| 1.0.0-beta.13574 | 51 | 10/2/2026 |
| 1.0.0-beta.13571 | 58 | 10/1/2026 |
| 1.0.0-beta.13563 | 56 | 10/1/2026 |
| 1.0.0-beta.13561 | 54 | 10/1/2026 |
| 1.0.0-beta.13557 | 41 | 10/1/2026 |
| 1.0.0-beta.13553 | 60 | 9/30/2026 |
| 1.0.0-beta.13545 | 48 | 9/30/2026 |
| 1.0.0-beta.13539 | 57 | 9/30/2026 |
| 1.0.0-beta.13532 | 56 | 9/29/2026 |
| 1.0.0-beta.13523 | 55 | 9/29/2026 |
| 1.0.0-beta.13515 | 57 | 9/28/2026 |
Loading failed