MeshWeaver.AI.AzureFoundry 2.3.0

dotnet add package MeshWeaver.AI.AzureFoundry --version 2.3.0
                    
NuGet\Install-Package MeshWeaver.AI.AzureFoundry -Version 2.3.0
                    
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.
<PackageReference Include="MeshWeaver.AI.AzureFoundry" Version="2.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MeshWeaver.AI.AzureFoundry" Version="2.3.0" />
                    
Directory.Packages.props
<PackageReference Include="MeshWeaver.AI.AzureFoundry" />
                    
Project file
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 MeshWeaver.AI.AzureFoundry --version 2.3.0
                    
#r "nuget: MeshWeaver.AI.AzureFoundry, 2.3.0"
                    
#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 MeshWeaver.AI.AzureFoundry@2.3.0
                    
#: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=MeshWeaver.AI.AzureFoundry&version=2.3.0
                    
Install as a Cake Addin
#tool nuget:?package=MeshWeaver.AI.AzureFoundry&version=2.3.0
                    
Install as a Cake Tool

MeshWeaver.AI.AzureFoundry

Overview

MeshWeaver.AI.AzureFoundry provides Azure AI Foundry integration for the MeshWeaver AI framework. Azure AI Foundry is a comprehensive platform for building, deploying, and managing AI applications at scale, featuring the Azure AI Agent Service for orchestrating and hosting AI agents.

Note: This implementation is currently a placeholder as full Azure AI Foundry Agent Service integration is still being developed. For production scenarios with Azure OpenAI, consider using MeshWeaver.AI.AzureOpenAI.

Features

  • Azure AI Foundry Integration: Framework for connecting to Azure AI Foundry project endpoints
  • Agent Service Ready: Prepared for Azure AI Foundry Agent Service when fully available
  • Configuration-Based Setup: Uses AzureAIFoundryConfiguration for project setup
  • Managed Identity Support: Built-in support for Azure managed identity authentication
  • Extensible Architecture: Built on top of MeshWeaver.AI's ChatCompletionAgentChatFactory base class

Azure AI Foundry Capabilities

Azure AI Foundry provides:

  • Model Catalog: Access to various AI models from different providers
  • Agent Service: Fully managed service for building, deploying, and scaling AI agents
  • Project Management: Unified project endpoints for accessing models and services
  • Security & Governance: Built-in responsible AI practices and monitoring
  • Tool Integration: Built-in tools like Azure AI Search, Bing Search, Code Interpreter, and more

Installation

This package is part of the MeshWeaver solution and should be referenced as a project dependency:

<ProjectReference Include="..\MeshWeaver.AI.AzureFoundry\MeshWeaver.AI.AzureFoundry.csproj" />

Configuration

1. Configure Azure AI Foundry

Add the following configuration to your appsettings.json:

{
  "AzureAIFoundry": {
    "ProjectEndpoint": "https://your-project.cognitiveservices.azure.com/",
    "DefaultModelName": "gpt-4",
    "Models": ["gpt-4", "gpt-35-turbo"],
    "UseManagedIdentity": true,
    "SubscriptionId": "your-subscription-id",
    "ResourceGroupName": "your-resource-group",
    "ProjectName": "your-project-name"
  }
}

2. Register Services

In your Program.cs or service configuration:

using MeshWeaver.AI.AzureFoundry;

// Configure Azure AI Foundry
builder.Services.Configure<AzureAIFoundryConfiguration>(
    builder.Configuration.GetSection("AzureAIFoundry"));

// Add Azure AI Foundry services
builder.Services.AddAzureAIFoundry();

Usage

Basic Implementation

public class MyService
{
    private readonly IAgentChatFactory _chatFactory;

    public MyService(IAgentChatFactory chatFactory)
    {
        _chatFactory = chatFactory;
    }

    public async Task<IAgentChat> CreateChatAsync()
    {
        var agentChat = await _chatFactory.CreateAsync();
        return agentChat;
    }
}

Agent Definition

Create custom agents by implementing IAgentDefinition:

public class MyCustomAgent : IAgentDefinition
{
    public string Name => "MyAgent";
    public string Description => "A custom AI agent for specific tasks";
    public string Instructions => "You are a helpful assistant specialized in...";
}

Current Status

This implementation is currently a placeholder while Azure AI Foundry Agent Service integration is being developed. The current version:

  • ✅ Provides configuration structure for Azure AI Foundry
  • ✅ Supports authentication via managed identity or DefaultAzureCredential
  • Placeholder: Full Azure AI Foundry Agent Service integration
  • Placeholder: Model inference through Azure AI Foundry endpoints
  • Placeholder: Integration with Azure AI Foundry tools and capabilities

For immediate production needs with Azure OpenAI, use MeshWeaver.AI.AzureOpenAI.

Future Roadmap

When Azure AI Foundry Agent Service becomes fully available, this package will support:

  • Native Agent Service: Direct integration with Azure AI Foundry Agent Service
  • Tool Integration: Built-in support for Azure AI Search, Bing Search, Code Interpreter
  • Model Catalog: Access to the full Azure AI Foundry model catalog
  • Evaluation & Monitoring: Built-in evaluation and monitoring capabilities
  • RAG Solutions: Seamless integration with Azure AI Search for RAG scenarios

Architecture

Class Hierarchy

ChatCompletionAgentChatFactory (MeshWeaver.AI)
└── AzureAIFoundryChatCompletionAgentChatFactory (MeshWeaver.AI.AzureFoundry)

Key Components

  • AzureAIFoundryChatCompletionAgentChatFactory: Main factory class (currently placeholder)
  • AzureFoundryExtensions: Extension methods for service registration
  • AzureAIFoundryConfiguration: Configuration model for Azure AI Foundry projects

Authentication

Azure AI Foundry supports multiple authentication methods:

  • Managed Identity (recommended for production): Automatically authenticates using the assigned managed identity
  • DefaultAzureCredential: Supports multiple authentication methods including:
    • Azure CLI
    • Visual Studio
    • Environment variables
    • Interactive browser authentication

Dependencies

  • Azure.AI.Inference (when available)
  • Azure.Identity
  • Azure.Core
  • Microsoft.SemanticKernel
  • Microsoft.Extensions.Options
  • Microsoft.Extensions.DependencyInjection.Abstractions
  • Microsoft.Extensions.Logging.Abstractions
  • MeshWeaver.AI
  • MeshWeaver.Messaging.Hub

Contributing

This project is part of the MeshWeaver ecosystem. Please follow the established patterns and conventions when contributing.

As Azure AI Foundry Agent Service becomes more mature, contributions to enhance this integration are welcome.

License

This project is licensed under the MIT License - see the main MeshWeaver repository for details.

Product 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.

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
2.3.0 168 8/4/2025
2.2.0 444 7/21/2025