Mekik.SemanticKernel 0.7.0

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

Mekik.SemanticKernel

Semantic Kernel integration for mekik. Run a kernel inside an ilmek node and get, per function:

  • Visibility — the kernel's function calls surface in the UI as tool_call traces
  • Approval — a function can pause for a human before it runs
  • Exactly-once — functions are journaled, so a pause/resume doesn't re-run them
.Node("agent", async (State state, IContext ctx) =>
{
    using var _ = kernel.UseMekik(ctx, new()
    {
        ["get_order"]       = new ToolPolicy(),                              // shown
        ["refund_payment"]  = new ToolPolicy { Approve = new ApproveSpec() },// ask the human first
        ["internal_lookup"] = new ToolPolicy { Show = false },               // runs, not shown
        ["charge"]          = new ToolPolicy { Redact = ["cardNumber"] },    // shown, masked
    });

    var settings = new PromptExecutionSettings { FunctionChoiceBehavior = FunctionChoiceBehavior.Auto() };
    var reply = await kernel.InvokePromptAsync(state.Get<string>("input"), new KernelArguments(settings));
    return Update.Of("reply", reply.ToString());
})

Why a filter, and what "and its derivatives" means

This ships an IFunctionInvocationFilter, which is the seam everything in Semantic Kernel funnels through: direct kernel.InvokeAsync, auto function calling, ChatCompletionAgent and the other agent types, and planners. One registration covers Semantic Kernel and anything built on top of it — you do not convert plugins or hand the agent a different tool list.

UseMekik returns a scope:

using var _ = kernel.UseMekik(ctx, policies);

Disposing removes the filter. That matters because a Kernel is usually long-lived while ctx belongs to a single graph run; leaving filters registered would leak a stale context into the next turn.

Policy lookup

Policies are matched by plugin-qualified name (Plugin.Function) first, then the bare function name — specific where two plugins share a name, terse everywhere else. ToolPolicy and ApproveSpec are the same types Mekik.Agents uses, so you learn one policy shape for both .NET integrations.

Notes

  • A declined function is short-circuited: next is never called, so it does not run, and the kernel receives DenyMessage as the result so the model can respond rather than see an exception.
  • Redact masks only what is surfaced; the function still receives real values.
  • Journaled results must survive a serializer round-trip, like any ilmek step.
  • Since KernelFunction derives from AIFunction, Mekik.Agents can also wrap SK functions directly — but wrapping changes the type, so the kernel's plugin collection would no longer accept them. Prefer this filter for Semantic Kernel.

MIT

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
0.7.0 36 7/31/2026
0.6.0 33 7/30/2026
0.5.0 58 7/30/2026
0.4.0 73 7/28/2026
0.3.0 80 7/28/2026
0.2.1 92 7/24/2026
0.2.0 89 7/24/2026
0.1.0 90 7/23/2026