OpenClaw.NET can host Microsoft.SemanticKernel code behind OpenClaw's tool execution model.
This repo intentionally keeps Semantic Kernel integration optional:
src/OpenClaw.Gatewayremains SK-free and stays NativeAOT-friendly.- SK support lives in
src/OpenClaw.SemanticKernelAdapterand is designed for non-AOT hosts.
OpenClaw does not attempt to replace Semantic Kernel.
Instead, SK runs inside a tool call, so OpenClaw can still enforce:
- authentication and gateway policy (in your host)
- tool approvals and allow/deny policies
- rate limiting / budgeting (in your host)
- OpenTelemetry tracing around execution
| Scenario | Supported | Notes |
|---|---|---|
| OpenClaw gateway NativeAOT publish | Yes | No SK dependency in the gateway. |
| SK interop via adapter library | Yes | Intended for normal .NET apps (non-AOT). |
Sample host (samples/OpenClaw.SemanticKernelInteropHost) |
Yes | Self-contained demo; not intended for NativeAOT. |
Semantic Kernel and some SK plugin patterns may rely on reflection and dynamic behaviors.
Recommendations:
- Keep SK interop in a separate, non-AOT host process (recommended).
- If you want AOT anyway: disable trimming for the SK host project and accept a larger binary.
- Treat SK interop as best-effort and validate your exact plugin set under your chosen publish settings.
OpenClaw.SemanticKernelAdapter- Provides:
semantic_kernelentrypoint tool (invoke by plugin/function)- Per-function tools named
sk_<plugin>_<function> - Optional governance hook (
SemanticKernelPolicyHook) usingIToolHookWithContext
- Provides:
The OpenClaw.SemanticKernelAdapter currently implements all phases of the Semantic Kernel interop roadmap. It is considered robust and production-ready for handling selective mapping, rate-limiting, and IStreamingTool context hooks.