Skip to content

Semantic Kernel

What it is

Semantic Kernel is an open-source SDK from Microsoft that allows developers to integrate LLMs into conventional programming languages like C#, Python, and Java. It uses "plugins" to combine AI capabilities with existing code.

What problem it solves

It bridges the gap between AI models and traditional software engineering. It provides a structured way to manage prompts, state, and tool-calling (native functions) while maintaining type safety and standard development practices.

Where it fits in the stack

Framework / SDK

Typical use cases

  • Enterprise App Integration: Adding AI features to existing .NET or Python applications.
  • Task Automation: Using LLMs to orchestrate a series of native code functions.
  • Custom Copilots: Building specialized assistants that interact with internal APIs.

Strengths

  • Multi-language Support: First-class support for C# / .NET, alongside Python and Java.
  • Extensible Plugins: Easy to wrap existing business logic as "tools" for the LLM.
  • Microsoft Ecosystem: Excellent integration with Azure OpenAI and other Microsoft services.

Limitations

  • Complexity: The "Kernel" and "Plugin" abstractions can feel heavy for small projects.
  • Python Parity: While improving, some features sometimes land in the .NET version before the Python SDK.

When to use it

  • When building enterprise-grade applications, especially in a .NET environment.
  • When you need to strictly control how AI interacts with your existing codebase.

When not to use it

  • For quick prototyping or research-focused LLM scripts.
  • If you don't need the "kernel" abstraction and prefer a more lightweight approach.

Getting started

Installation

pip install semantic-kernel

Minimal Python Example

import asyncio
from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.open_ai import OpenAIChatCompletion

async def main():
    kernel = Kernel()
    kernel.add_service(OpenAIChatCompletion(ai_model_id="gpt-3.5-turbo"))
    func = kernel.add_function(prompt="What is the capital of {{$input}}?", plugin_name="Geo", function_name="Capital")
    result = await kernel.invoke(func, input="France")
    print(result)

if __name__ == "__main__":
    asyncio.run(main())

Licensing and cost

  • Open Source: Yes (MIT License)
  • Cost: Free
  • Self-hostable: Yes

Sources / References

Contribution Metadata

  • Last reviewed: 2026-03-02
  • Confidence: high