Mekik.Agents
0.7.0
dotnet add package Mekik.Agents --version 0.7.0
NuGet\Install-Package Mekik.Agents -Version 0.7.0
<PackageReference Include="Mekik.Agents" Version="0.7.0" />
<PackageVersion Include="Mekik.Agents" Version="0.7.0" />
<PackageReference Include="Mekik.Agents" />
paket add Mekik.Agents --version 0.7.0
#r "nuget: Mekik.Agents, 0.7.0"
#:package Mekik.Agents@0.7.0
#addin nuget:?package=Mekik.Agents&version=0.7.0
#tool nuget:?package=Mekik.Agents&version=0.7.0
Mekik.Agents
Microsoft.Extensions.AI integration for mekik. Run a tool-calling chat client inside an ilmek node and get, per function:
- Visibility — the model's function calls surface in the UI as
tool_calltraces - 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
var tools = MekikTools.Wrap(ctx, [getOrder, refundPayment, internalLookup, charge], 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 response = await chatClient.GetResponseAsync(
messages, new ChatOptions { Tools = [.. tools] }, ct);
The wrappers are DelegatingAIFunctions, so name, description and JSON schema
are preserved and the model sees exactly the same tools.
Why wrapping
A chat client invokes its own functions. That leaves two gaps Shuttle.Tool
normally closes for you:
- Nothing emits a
tool_callframe, so the UI never learns a function ran. - When a node pauses for a human and the graph resumes, the node re-runs from
the top — and the model calls its functions again. Only
ctx.StepAsyncmakes an effect survive that replay.
Relationship to ApprovalRequiredAIFunction
Microsoft.Extensions.AI ships its own approval marker, which asks through the
chat protocol: the caller must round-trip approval content with the model.
ToolPolicy.Approve instead pauses the graph with a mekik interrupt, so the
question renders in chativa as chips (or a form), and the pause lives in ilmek's
checkpoint — it survives a process restart. Use whichever fits; they are not
mutually exclusive.
Notes
Redactmasks only what is surfaced; the function still receives real values.- A declined function is never executed and returns
DenyMessage(default"The user declined to run <name>.") so the model's loop can continue. - Each function gets a stable interrupt key, so several approvals in one node stay separately addressable.
- Journaled results must survive a serializer round-trip, like any ilmek step.
This is the .NET mirror of @mekik/langchain; both keep the same policy shape.
MIT
| Product | Versions 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. |
-
net9.0
- Mekik.Core (>= 0.7.0)
- Microsoft.Extensions.AI.Abstractions (>= 10.8.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Mekik.Agents:
| Package | Downloads |
|---|---|
|
Mekik.SemanticKernel
Semantic Kernel integration for mekik — surface a kernel's function calls in the UI, gate them behind human approval, and make them exactly-once across an interrupt/resume. One filter covers auto function calling, agents and planners. |
GitHub repositories
This package is not used by any popular GitHub repositories.