JKToolKit.CodexSDK.SemanticKernel
0.0.168
See the version list below for details.
dotnet add package JKToolKit.CodexSDK.SemanticKernel --version 0.0.168
NuGet\Install-Package JKToolKit.CodexSDK.SemanticKernel -Version 0.0.168
<PackageReference Include="JKToolKit.CodexSDK.SemanticKernel" Version="0.0.168" />
<PackageVersion Include="JKToolKit.CodexSDK.SemanticKernel" Version="0.0.168" />
<PackageReference Include="JKToolKit.CodexSDK.SemanticKernel" />
paket add JKToolKit.CodexSDK.SemanticKernel --version 0.0.168
#r "nuget: JKToolKit.CodexSDK.SemanticKernel, 0.0.168"
#:package JKToolKit.CodexSDK.SemanticKernel@0.0.168
#addin nuget:?package=JKToolKit.CodexSDK.SemanticKernel&version=0.0.168
#tool nuget:?package=JKToolKit.CodexSDK.SemanticKernel&version=0.0.168
Semantic Kernel Adapter
JKToolKit.CodexSDK.SemanticKernel adapts Semantic Kernel native functions to Codex app-server dynamic tools.
This is useful when you already have SK plugins marked with [KernelFunction] and want Codex app-server to call them through its item/tool/call flow.
NuGet package: JKToolKit.CodexSDK.SemanticKernel
Install
Install the adapter package into the project that owns your Semantic Kernel plugins:
dotnet add package JKToolKit.CodexSDK.SemanticKernel
The adapter package depends on JKToolKit.CodexSDK and Microsoft.SemanticKernel.Abstractions. If your project does not already reference Semantic Kernel's core package, add it too:
dotnet add package Microsoft.SemanticKernel.Core --version 1.75.0
Usage
using JKToolKit.CodexSDK;
using JKToolKit.CodexSDK.AppServer;
using JKToolKit.CodexSDK.Models;
using JKToolKit.CodexSDK.SemanticKernel;
using Microsoft.SemanticKernel;
var kernelBuilder = Kernel.CreateBuilder();
kernelBuilder.Plugins.AddFromObject(new OrderPizzaPlugin(), "OrderPizza");
var kernel = kernelBuilder.Build();
var skTools = SemanticKernelCodexToolAdapter.Create(kernel);
await using var sdk = CodexSdk.Create(builder =>
{
builder.ConfigureAppServer(o =>
{
o.ExperimentalApi = true;
o.ApprovalHandler = skTools.ApprovalHandler;
});
});
await using var codex = await sdk.AppServer.StartAsync();
var thread = await codex.StartThreadAsync(new ThreadStartOptions
{
Cwd = Environment.CurrentDirectory,
Sandbox = CodexSandboxMode.ReadOnly,
ApprovalPolicy = CodexApprovalPolicy.Never,
DynamicTools = skTools.DynamicTools
});
await using var turn = await codex.StartTurnAsync(thread.Id, new TurnStartOptions
{
Input = [TurnInputItem.Text("Order one large pepperoni pizza and checkout.")]
});
Run the end-to-end pizza demo:
dotnet run --project src/JKToolKit.CodexSDK.Demo -- sk-function-calling --repo "<repo-path>"
The demo inherits the default model from your Codex configuration. To force a model, pass --model <MODEL>, for example:
dotnet run --project src/JKToolKit.CodexSDK.Demo -- sk-function-calling --model gpt-5.5
Notes
- Codex dynamic tools are currently behind the app-server experimental API capability, so set
CodexAppServerClientOptions.ExperimentalApi = true. - Tool names use Semantic Kernel's plugin/function naming pattern:
PluginName-function_name. - Unknown app-server server requests are delegated to the optional fallback handler passed to
SemanticKernelCodexToolAdapter.Create.
| Product | Versions 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. |
-
net10.0
- JKToolKit.CodexSDK (>= 0.0.168)
- Microsoft.SemanticKernel.Abstractions (>= 1.75.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.