Microsoft.Extensions.AI
9.10.2
Prefix Reserved
dotnet add package Microsoft.Extensions.AI --version 9.10.2
NuGet\Install-Package Microsoft.Extensions.AI -Version 9.10.2
<PackageReference Include="Microsoft.Extensions.AI" Version="9.10.2" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.10.2" />
<PackageReference Include="Microsoft.Extensions.AI" />
paket add Microsoft.Extensions.AI --version 9.10.2
#r "nuget: Microsoft.Extensions.AI, 9.10.2"
#:package Microsoft.Extensions.AI@9.10.2
#addin nuget:?package=Microsoft.Extensions.AI&version=9.10.2
#tool nuget:?package=Microsoft.Extensions.AI&version=9.10.2
Microsoft.Extensions.AI
.NET developers need to integrate and interact with a growing variety of artificial intelligence (AI) services in their apps. The Microsoft.Extensions.AI libraries provide a unified approach for representing generative AI components, and enable seamless integration and interoperability with various AI services.
The packages
The Microsoft.Extensions.AI.Abstractions package provides the core exchange types, including IChatClient and IEmbeddingGenerator<TInput,TEmbedding>. Any .NET library that provides an LLM client can implement the IChatClient interface to enable seamless integration with consuming code.
The Microsoft.Extensions.AI package has an implicit dependency on the Microsoft.Extensions.AI.Abstractions package. This package enables you to easily integrate components such as automatic function tool invocation, telemetry, and caching into your applications using familiar dependency injection and middleware patterns. For example, it provides the UseOpenTelemetry(ChatClientBuilder, ILoggerFactory, String, Action<OpenTelemetryChatClient>) extension method, which adds OpenTelemetry support to the chat client pipeline.
Which package to reference
Libraries that provide implementations of the abstractions typically reference only Microsoft.Extensions.AI.Abstractions.
To also have access to higher-level utilities for working with generative AI components, reference the Microsoft.Extensions.AI package instead (which itself references Microsoft.Extensions.AI.Abstractions). Most consuming applications and services should reference the Microsoft.Extensions.AI package along with one or more libraries that provide concrete implementations of the abstractions.
Install the package
From the command-line:
dotnet add package Microsoft.Extensions.AI
Or directly in the C# project file:
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI" Version="[CURRENTVERSION]" />
</ItemGroup>
Documentation
Refer to the Microsoft.Extensions.AI libraries documentation for more information and API usage examples.
Feedback & Contributing
We welcome feedback and contributions in our GitHub repo.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.Extensions.AI.Abstractions (>= 9.10.2)
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
- System.Numerics.Tensors (>= 9.0.10)
- System.Text.Json (>= 8.0.6)
- System.Threading.Channels (>= 8.0.0)
-
.NETStandard 2.0
- Microsoft.Extensions.AI.Abstractions (>= 9.10.2)
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- System.Diagnostics.DiagnosticSource (>= 8.0.1)
- System.Numerics.Tensors (>= 9.0.10)
- System.Text.Json (>= 8.0.6)
- System.Threading.Channels (>= 8.0.0)
-
net8.0
- Microsoft.Extensions.AI.Abstractions (>= 9.10.2)
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- System.Numerics.Tensors (>= 9.0.10)
-
net9.0
- Microsoft.Extensions.AI.Abstractions (>= 9.10.2)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.10)
- System.Numerics.Tensors (>= 9.0.10)
NuGet packages (103)
Showing the top 5 NuGet packages that depend on Microsoft.Extensions.AI:
| Package | Downloads |
|---|---|
|
Microsoft.SemanticKernel.Abstractions
Semantic Kernel interfaces and abstractions. This package is automatically installed by Semantic Kernel packages if needed. |
|
|
Aspire.Azure.AI.OpenAI
A client for Azure OpenAI that integrates with Aspire, including logging and telemetry. |
|
|
XrmToolBoxPackage
Add the references required to develop a XrmToolBox plugin |
|
|
Aspire.OpenAI
A client for OpenAI that integrates with Aspire, including metrics and telemetry. |
|
|
CommunityToolkit.Aspire.OllamaSharp
A .NET Aspire client integration for the OllamaSharp library. |
GitHub repositories (38)
Showing the top 20 popular GitHub repositories that depend on Microsoft.Extensions.AI:
| Repository | Stars |
|---|---|
|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
|
dotnet/aspire
Aspire is the tool for code-first, extensible, observable dev and deploy.
|
|
|
microsoft/agent-framework
A framework for building, orchestrating and deploying AI agents and multi-agent workflows with support for Python and .NET.
|
|
|
modelcontextprotocol/csharp-sdk
The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.
|
|
|
dotnet/maui-samples
Samples for .NET Multi-Platform App UI (.NET MAUI)
|
|
|
microsoft/Generative-AI-for-beginners-dotnet
Five lessons, learn how to really apply AI to your .NET Applications
|
|
|
LittleLittleCloud/RazorConsole
Build interactive console applications with .NET Razor and Spectre.Console
|
|
|
abpframework/abp-samples
Sample solutions built with the ABP Framework
|
|
|
microsoft/ai-dev-gallery
An open-source project for Windows developers to learn how to add AI with local models and APIs to Windows apps.
|
|
|
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
|
|
|
drasi-project/drasi-platform
The Data Change Processing platform
|
|
|
awaescher/OllamaSharp
The easiest way to use Ollama in .NET
|
|
|
tryAGI/LangChain
C# implementation of LangChain. We try to be as close to the original as possible in terms of abstractions, but are open to new entities.
|
|
|
getcellm/cellm
Use LLMs in Excel formulas
|
|
|
dotnet/ai-samples
|
|
|
MscrmTools/XrmToolBox
An application that gather multiple tools to ease the customization and configuration of Microsoft Dynamics CRM/365/Dataverse/PowerApps
|
|
|
CommunityToolkit/Aspire
A community project with additional components and extensions for .NET Aspire
|
|
|
PowerShell/AIShell
An interactive shell to work with AI-powered assistance providers
|
|
|
DevExpress/Blazor
DevExpress UI for Blazor
|
|
|
thangchung/practical-dotnet-aspire
The practical .NET Aspire builds on the coffeeshop app business domain
|
| Version | Downloads | Last Updated |
|---|---|---|
| 9.10.2 | 16,409 | 11/2/2025 |
| 9.10.1 | 37,848 | 10/22/2025 |
| 9.10.0 | 71,428 | 10/14/2025 |
| 9.9.1 | 223,912 | 9/25/2025 |
| 9.9.0 | 363,782 | 9/9/2025 |
| 9.8.0 | 395,072 | 8/12/2025 |
| 9.7.1 | 354,383 | 7/15/2025 |
| 9.7.0 | 53,837 | 7/8/2025 |
| 9.6.0 | 382,505 | 6/10/2025 |
| 9.5.0 | 828,631 | 5/16/2025 |
| 9.5.0-preview.1.25262.9 | 18,235 | 5/13/2025 |
| 9.4.4-preview.1.25259.16 | 13,645 | 5/10/2025 |
| 9.4.3-preview.1.25230.7 | 36,382 | 5/1/2025 |
| 9.4.0-preview.1.25207.5 | 236,851 | 4/8/2025 |
| 9.3.0-preview.1.25161.3 | 150,128 | 3/11/2025 |
| 9.3.0-preview.1.25114.11 | 137,948 | 2/16/2025 |
| 9.1.0-preview.1.25064.3 | 78,615 | 1/14/2025 |
| 9.0.1-preview.1.24570.5 | 119,891 | 11/21/2024 |
| 9.0.0-preview.9.24556.5 | 66,337 | 11/12/2024 |
| 9.0.0-preview.9.24525.1 | 36,915 | 10/26/2024 |
| 9.0.0-preview.9.24507.7 | 14,302 | 10/8/2024 |