Microsoft.Extensions.AI.Abstractions
9.8.0
Prefix Reserved
dotnet add package Microsoft.Extensions.AI.Abstractions --version 9.8.0
NuGet\Install-Package Microsoft.Extensions.AI.Abstractions -Version 9.8.0
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.8.0" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.8.0" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" />
paket add Microsoft.Extensions.AI.Abstractions --version 9.8.0
#r "nuget: Microsoft.Extensions.AI.Abstractions, 9.8.0"
#:package Microsoft.Extensions.AI.Abstractions@9.8.0
#addin nuget:?package=Microsoft.Extensions.AI.Abstractions&version=9.8.0
#tool nuget:?package=Microsoft.Extensions.AI.Abstractions&version=9.8.0
Microsoft.Extensions.AI.Abstractions
.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.Abstractions
Or directly in the C# project file:
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" 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
- System.Text.Json (>= 8.0.6)
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.6)
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (99)
Showing the top 5 NuGet packages that depend on Microsoft.Extensions.AI.Abstractions:
Package | Downloads |
---|---|
Microsoft.Extensions.VectorData.Abstractions
Abstractions for vector database access. Commonly Used Types: Microsoft.Extensions.VectorData.IVectorStore Microsoft.Extensions.VectorData.IVectorStoreRecordCollection<TKey, TRecord> |
|
Microsoft.Extensions.AI
Utilities for working with generative AI components. |
|
Microsoft.Extensions.AI.OpenAI
Implementation of generative AI abstractions for OpenAI-compatible endpoints. |
|
OllamaSharp
The easiest way to use the Ollama API in .NET |
|
LLamaSharp
LLamaSharp is a cross-platform library to run 🦙LLaMA/LLaVA model (and others) in your local device. Based on [llama.cpp](https://github.com/ggerganov/llama.cpp), inference with LLamaSharp is efficient on both CPU and GPU. With the higher-level APIs and RAG support, it's convenient to deploy LLM (Large Language Model) in your application with LLamaSharp. |
GitHub repositories (28)
Showing the top 20 popular GitHub repositories that depend on Microsoft.Extensions.AI.Abstractions:
Repository | Stars |
---|---|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
dotnet/machinelearning
ML.NET is an open source and cross-platform machine learning framework for .NET.
|
|
Azure/azure-sdk-for-net
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
|
|
SciSharp/LLamaSharp
A C#/.NET library to run LLM (🦙LLaMA/LLaVA) on your local device efficiently.
|
|
modelcontextprotocol/csharp-sdk
The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.
|
|
betalgo/openai
.NET library for the OpenAI service API by Betalgo Ranul
|
|
SciSharp/BotSharp
AI Multi-Agent Framework in .NET
|
|
microsoft/Generative-AI-for-beginners-dotnet
Five lessons, learn how to really apply AI to your .NET Applications
|
|
dapr/dotnet-sdk
Dapr SDK for .NET
|
|
awaescher/OllamaSharp
The easiest way to use Ollama in .NET
|
|
getcellm/cellm
Use LLMs in Excel formulas
|
|
VladislavAntonyuk/MauiSamples
.NET MAUI Samples
|
|
dotnet/ai-samples
|
|
sandrohanea/whisper.net
Whisper.net. Speech to text made simple using Whisper Models
|
|
MscrmTools/XrmToolBox
An application that gather multiple tools to ease the customization and configuration of Microsoft Dynamics CRM/365/Dataverse/PowerApps
|
|
PowerShell/AIShell
An interactive shell to work with AI-powered assistance providers
|
|
DevExpress/Blazor
DevExpress UI for Blazor
|
|
axzxs2001/Asp.NetCoreExperiment
原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
|
|
afrise/MCPSharp
MCPSharp is a .NET library that helps you build Model Context Protocol (MCP) servers and clients - the standardized API protocol used by AI assistants and models.
|
|
PederHP/mcpdotnet
.NET implementation of the Model Context Protocol (MCP)
|
Version | Downloads | Last Updated |
---|---|---|
9.8.0 | 103,029 | 8/12/2025 |
9.7.1 | 352,407 | 7/15/2025 |
9.7.0 | 82,509 | 7/8/2025 |
9.6.0 | 329,396 | 6/10/2025 |
9.5.0 | 1,146,452 | 5/16/2025 |
9.5.0-preview.1.25262.9 | 109,761 | 5/13/2025 |
9.4.4-preview.1.25259.16 | 30,650 | 5/10/2025 |
9.4.3-preview.1.25230.7 | 164,333 | 5/1/2025 |
9.4.0-preview.1.25207.5 | 607,170 | 4/8/2025 |
9.3.0-preview.1.25161.3 | 584,251 | 3/11/2025 |
9.3.0-preview.1.25114.11 | 397,143 | 2/16/2025 |
9.1.0-preview.1.25064.3 | 700,713 | 1/14/2025 |
9.0.1-preview.1.24570.5 | 676,054 | 11/21/2024 |
9.0.0-preview.9.24556.5 | 79,473 | 11/12/2024 |
9.0.0-preview.9.24525.1 | 418,672 | 10/26/2024 |
9.0.0-preview.9.24507.7 | 20,246 | 10/8/2024 |