Microsoft is previewing packages geared to integrating generative AI services into .NET applications.

Called Microsoft.Extensions.AI.Abstractions and Microsoft.Extensions.AI libraries, the packages are available in preview as of October 8. The packages are described as unified AI building blocks for .NET.

The Microsoft.Extensions.AI.Abstractions and Microsoft.Extensions.AI packages provide the .NET ecosystem with essential abstractions for integrating AI services into .NET applications and libraries, along with middleware for adding key capabilities, Microsoft said in a blog post. Microsoft.Extensions.AI is a set of core libraries developed in collaboration with developers across the .NET ecosystem. The libraries provide a unified layer of C# abstractions for interacting with AI services such as large language models (LLMs), embeddings, and middleware.

Core benefits of the Microsoft.Extensions.AI libraries include:

  • Providing a consistent set of APIs and conventions for integrating AI services into .NET applications.
  • Allowing .NET library authors to use AI services without being tied to a specific provider.
  • Enabling .NET developers to experiment with different packages using the same underlying abstractions, maintaining a single API throughout an application.
  • Simplifying the addition of new capabilities and facilitating the componentization and testing of applications.

Instructions on getting started with the Microsoft.Extensions.AI packages can be found in the October 8 blog post. Microsoft’s current focus is on creating abstractions that can be implemented across various services, the company said. There is no plan to release APIs tailored to any specific provider’s services. Microsoft’s goal is to act as a unifying layer within the .NET ecosystem, enabling developers to choose preferred frameworks and libraries while ensuring integration and collaboration across the ecosystem.

In explaining the libraries, Microsoft’s Luis Quintanilla, program manager for the developer division, said AI capabilities are rapidly evolving, with common patterns emerging for functionality such as chat, embeddings, and tool calling. Unified abstractions are crucial for developers to work across different sources, he said.