CodedProjects.AI.ApiMapper.Client.SemanticKernel 1.2.0

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

CodedProjects AI ApiMapper .NET SDK

The CodedProjects AI ApiMapper .NET SDK helps .NET applications discover and invoke governed AI-facing tools exposed by the AI ApiMapper Runtime.

Use these packages when you want to:

  • connect an AI client to tenant-scoped tools published by AI ApiMapper,
  • fetch the runtime system prompt and available tool definitions,
  • invoke tools through a typed .NET client,
  • bridge those tools into common .NET AI stacks such as Microsoft.Extensions.AI, Semantic Kernel, and Azure AI Foundry.

Packages

Core client

dotnet add package CodedProjects.AI.ApiMapper.Client

Provides the base IAiApiMapperClient, HTTP client registration, authentication configuration, tool discovery, and tool invocation support.

Microsoft.Extensions.AI adapter

dotnet add package CodedProjects.AI.ApiMapper.Client.MicrosoftExtensionsAI

Converts runtime tools into AIFunction instances for Microsoft.Extensions.AI.

Semantic Kernel adapter

dotnet add package CodedProjects.AI.ApiMapper.Client.SemanticKernel

Loads published runtime tools as a Semantic Kernel plugin.

Azure AI Foundry adapter

dotnet add package CodedProjects.AI.ApiMapper.Client.AzureAIFoundry --prerelease

Adds Azure AI Foundry agent integration. This package is currently prerelease because it depends on prerelease Azure AI agent libraries.

Quick start

using CodedProjects.AI.ApiMapper.Client;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();

services
    .AddApiMapperClient(options =>
    {
        options.BaseUrl = new Uri("https://runtime.example.com/");
        options.TenantId = Guid.Parse("11111111-1111-1111-1111-111111111111");
        options.ClientId = "my-ai-client";
        options.SystemPromptResourceUri = "apimapper://toolsets/system-prompt";
    })
    .WithApiKey("replace-with-your-api-key");

After resolving IAiApiMapperClient, you can:

  • call GetSystemPromptAsync() to load the runtime-provided system prompt,
  • call GetToolsAsync() to enumerate published tools,
  • call InvokeToolAsync() to execute a tool with JSON-like arguments.

Examples

Runnable examples are available for:

  • raw MCP-style client usage,
  • Microsoft.Extensions.AI,
  • Semantic Kernel,
  • Azure AI Foundry.

Streamable HTTP / SSE

The Runtime's /mcp endpoint may answer a request with either a plain application/json body or an SSE-framed (text/event-stream) body — both are first-class steady-state responses, not a fallback of one another, and the choice is made server-side. CodedProjects.AI.ApiMapper.Client handles both transparently: no configuration is needed, and every existing call (GetToolsAsync, InvokeToolAsync, etc.) keeps working unchanged. If an SSE response is dropped before its result arrives, the client automatically attempts one resumption via Last-Event-ID before surfacing an error.

Two additional APIs on IAiApiMapperClient round out MCP session lifecycle support:

Closing a session

// Explicitly end the MCP session server-side (DELETE /mcp) when you're done with the client.
await client.CloseSessionAsync();

// Or dispose asynchronously, which closes the session best-effort before releasing resources:
await using var scopedClient = ...;

Listening for server-pushed messages

ListenAsync opens the standalone push stream (GET /mcp) and yields each JSON-RPC message the Runtime pushes for the session, reconnecting automatically (with Last-Event-ID) after transient network faults:

await foreach (var message in client.ListenAsync(cancellationToken))
{
    // message is a System.Text.Json.JsonElement containing the pushed JSON-RPC payload.
    Console.WriteLine(message.GetRawText());
}

Correlation IDs

Send your application's own trace ID with each call and the Runtime records it against the execution ID it generates, so you can retrieve the full platform audit trail for work you triggered. Configure an ambient provider on the client options, or pass one per call. See the SDK correlation guide.

Package metadata

  • License: MIT
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
1.2.0 52 9/12/2026
1.0.0 186 6/14/2026

ApiMapper SDK 1.2 release.