JKToolKit.CodexSDK.AgentFramework 0.0.166

There is a newer version of this package available.
See the version list below for details.
dotnet add package JKToolKit.CodexSDK.AgentFramework --version 0.0.166
                    
NuGet\Install-Package JKToolKit.CodexSDK.AgentFramework -Version 0.0.166
                    
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="JKToolKit.CodexSDK.AgentFramework" Version="0.0.166" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JKToolKit.CodexSDK.AgentFramework" Version="0.0.166" />
                    
Directory.Packages.props
<PackageReference Include="JKToolKit.CodexSDK.AgentFramework" />
                    
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 JKToolKit.CodexSDK.AgentFramework --version 0.0.166
                    
#r "nuget: JKToolKit.CodexSDK.AgentFramework, 0.0.166"
                    
#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 JKToolKit.CodexSDK.AgentFramework@0.0.166
                    
#: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=JKToolKit.CodexSDK.AgentFramework&version=0.0.166
                    
Install as a Cake Addin
#tool nuget:?package=JKToolKit.CodexSDK.AgentFramework&version=0.0.166
                    
Install as a Cake Tool

Microsoft Agent Framework Adapter

NuGet NuGet Downloads

JKToolKit.CodexSDK.AgentFramework adapts Microsoft Agent Framework function tools to Codex app-server dynamic tools.

This is useful when you already have Agent Framework tools represented as Microsoft.Extensions.AI.AIFunction instances and want Codex app-server to call them through its item/tool/call flow.

NuGet package: JKToolKit.CodexSDK.AgentFramework

Microsoft docs: Agent Framework and function tools.

Install

Install the adapter package into the project that owns your Agent Framework tools:

dotnet add package JKToolKit.CodexSDK.AgentFramework

The adapter package depends on JKToolKit.CodexSDK and Microsoft.Extensions.AI.Abstractions.

Usage

using JKToolKit.CodexSDK;
using JKToolKit.CodexSDK.AgentFramework;
using JKToolKit.CodexSDK.AppServer;
using JKToolKit.CodexSDK.Models;
using Microsoft.Extensions.AI;

AIFunction getWeather = AIFunctionFactory.Create(
    (Func<string, string>)(location => $"Weather in {location}: cloudy."),
    name: "get_weather",
    description: "Gets the weather for a location.");

var agentFrameworkTools = AgentFrameworkCodexToolAdapter.Create([getWeather]);

await using var sdk = CodexSdk.Create(builder =>
{
    builder.ConfigureAppServer(o =>
    {
        o.ExperimentalApi = true;
        o.ApprovalHandler = agentFrameworkTools.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 = agentFrameworkTools.DynamicTools
});

await using var turn = await codex.StartTurnAsync(thread.Id, new TurnStartOptions
{
    Input = [TurnInputItem.Text("Use the weather tool for Vienna.")]
});

Run the end-to-end pizza demo:

dotnet run --project src/JKToolKit.CodexSDK.Demo -- agent-framework-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 -- agent-framework-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 are the AIFunction.Name values supplied by Agent Framework.
  • Unknown app-server server requests are delegated to the optional fallback handler passed to AgentFrameworkCodexToolAdapter.Create.
  • Agent Framework agents can also be exposed to other tool callers with AIAgent.AsAIFunction(...); pass those AIFunction instances to the adapter the same way.
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
0.0.174 71 5/4/2026
0.0.169 67 5/4/2026
0.0.168 65 5/4/2026
0.0.167 71 5/4/2026
0.0.166 70 5/4/2026