CodeDesignPlus.Net.AI.Abstractions
1.0.0-beta.12900
dotnet add package CodeDesignPlus.Net.AI.Abstractions --version 1.0.0-beta.12900
NuGet\Install-Package CodeDesignPlus.Net.AI.Abstractions -Version 1.0.0-beta.12900
<PackageReference Include="CodeDesignPlus.Net.AI.Abstractions" Version="1.0.0-beta.12900" />
<PackageVersion Include="CodeDesignPlus.Net.AI.Abstractions" Version="1.0.0-beta.12900" />
<PackageReference Include="CodeDesignPlus.Net.AI.Abstractions" />
paket add CodeDesignPlus.Net.AI.Abstractions --version 1.0.0-beta.12900
#r "nuget: CodeDesignPlus.Net.AI.Abstractions, 1.0.0-beta.12900"
#:package CodeDesignPlus.Net.AI.Abstractions@1.0.0-beta.12900
#addin nuget:?package=CodeDesignPlus.Net.AI.Abstractions&version=1.0.0-beta.12900&prerelease
#tool nuget:?package=CodeDesignPlus.Net.AI.Abstractions&version=1.0.0-beta.12900&prerelease
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<MyCommand>
{
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<ChatMessage>
{
new(ChatRole.User, "Create a purchase receipt email"),
new(ChatRole.Assistant, "<html>...</html>"),
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. |
-
net9.0
- Microsoft.Extensions.Options (>= 9.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CodeDesignPlus.Net.AI.Abstractions:
| Package | Downloads |
|---|---|
|
CodeDesignPlus.Net.AI
CodeDesignPlus.Net.AI provides a unified multi-provider AI/LLM integration for .NET microservices. Supports Claude (Anthropic), OpenAI, and Azure OpenAI with configurable agents, system prompts, temperature, and token limits. Register with services.AddAI(configuration) and consume via IAIService. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-beta.12900 | 41 | 6/20/2026 |
| 1.0.0-beta.12898 | 43 | 6/19/2026 |
| 1.0.0-beta.12897 | 58 | 6/19/2026 |