Heuristic:Microsoft Semantic kernel Experimental Feature Opt In
| Knowledge Sources | |
|---|---|
| Domains | API_Stability, Configuration |
| Last Updated | 2026-02-11 20:00 GMT |
Overview
Guide for managing Semantic Kernel experimental feature codes (SKEXP) that must be explicitly suppressed to use agent, process, memory, and AOT features.
Description
Semantic Kernel marks features under active development with [Experimental("SKEXPXXXX")] attributes. These generate compiler warnings that must be explicitly suppressed to use the feature. This design ensures developers consciously opt in to APIs that may change in future releases. The experimental codes cover major feature areas: memory and embeddings (SKEXP0001), OpenAI-specific features (SKEXP0010), memory connectors (SKEXP0020), core plugins (SKEXP0050), the Process Framework (SKEXP0080), the Agent Framework (SKEXP0110), prompt template extensions (SKEXP0120), and AI context providers (SKEXP0130).
Usage
Use this heuristic whenever you encounter SKEXPXXXX compiler warnings or when planning to use Semantic Kernel features from the agent, process, memory, or plugin namespaces. Essential for all implementations in Workflows 3 (Agent Orchestration), 4 (Process Orchestration), and parts of Workflow 5 (Vector Store RAG).
The Insight (Rule of Thumb)
- Action: Suppress experimental warnings either per-file with
#pragma warning disableor project-wide via the.csprojNoWarnproperty. - Value: Per-file approach is preferred for production code (explicit about which APIs are experimental). Project-wide suppression is acceptable for samples and prototypes.
- Trade-off: Suppressing warnings removes the safety net of being alerted when experimental APIs change. Pin your Semantic Kernel package version if suppressing project-wide.
Reasoning
The experimental attribute system serves two purposes: it signals that an API is still being refined and may have breaking changes, and it creates a compile-time gate that forces developers to acknowledge the risk. The per-file #pragma approach creates a clear audit trail of which files depend on experimental features, making it easier to assess impact when upgrading Semantic Kernel versions.
Key SKEXP codes and their scope:
- SKEXP0001 — Memory, embeddings, image services, audio services, kernel filters
- SKEXP0010 — OpenAI-specific connector features
- SKEXP0050 — Core plugins, document plugins, text chunker
- SKEXP0080 — Process Framework (all process-related APIs)
- SKEXP0110 — Agent Framework (all agent-related APIs)
- SKEXP0120 — Native AOT support, prompt template extensions
- SKEXP0130 — AI context providers (Mem0, Whiteboard)
Code Evidence
Experimental attribute on Agent APIs from dotnet/src/SemanticKernel.Abstractions/PromptTemplate/PromptTemplateConfig.cs:78:
[Experimental("SKEXP0120")]
Memory services marked experimental from dotnet/src/SemanticKernel.Abstractions/Memory/MemoryRecord.cs:14:
[Experimental("SKEXP0001")]
Per-file suppression pattern (from samples):
#pragma warning disable SKEXP0110
var agent = new ChatCompletionAgent()
{
Name = "MyAgent",
Instructions = "You are a helpful assistant.",
Kernel = kernel
};
#pragma warning restore SKEXP0110
Project-wide suppression pattern (from .csproj):
<PropertyGroup>
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0010;SKEXP0110</NoWarn>
</PropertyGroup>
Related Pages
- Implementation:Microsoft_Semantic_kernel_ChatCompletionAgent
- Implementation:Microsoft_Semantic_kernel_Orchestration_Patterns
- Implementation:Microsoft_Semantic_kernel_KernelProcessStep
- Implementation:Microsoft_Semantic_kernel_ProcessBuilder
- Principle:Microsoft_Semantic_kernel_Chat_Completion_Agent_Creation
- Principle:Microsoft_Semantic_kernel_Process_Step_Definition