semantic-kernel

microsoft/semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps

28k
Stars
4.7k
Forks
261
Open issues
294
Watchers
C# MITLast pushed Jul 7, 2026

Integrate cutting-edge LLM technology quickly and easily into your apps

Categories

Tags

Similar tools

Install

git clone https://github.com/microsoft/semantic-kernel

README

Semantic Kernel

[!IMPORTANT] Semantic Kernel is now Microsoft Agent Framework! Microsoft Agent Framework (MAF) is the enterprise‑ready successor to Semantic Kernel. Microsoft Agent Framework is now available at version 1.0 as a production-ready release: stable APIs, and a commitment to long-term support. Whether you're building a single assistant or orchestrating a fleet of specialized agents, Microsoft Agent Framework 1.0 gives you enterprise-grade multi-agent orchestration, multi-provider model support, and cross-runtime interoperability via A2A and MCP.

Learn more about Semantic Kernel and Agent Framework here: Semantic Kernel and Microsoft Agent Framework on the Agent Framework blog, and try out the Semantic Kernel migration guide.

Build intelligent AI agents and multi-agent systems with this enterprise-ready orchestration framework

What is Semantic Kernel?

Semantic Kernel is a model-agnostic SDK that empowers developers to build, orchestrate, and deploy AI agents and multi-agent systems. Whether you're building a simple chatbot or a complex multi-agent workflow, Semantic Kernel provides the tools you need with enterprise-grade reliability and flexibility.

System Requirements

  • Python: 3.10+
  • .NET: .NET 10.0+
  • Java: JDK 17+
  • OS Support: Windows, macOS, Linux

Key Features

  • Model Flexibility: Connect to any LLM with built-in support for OpenAI, Azure OpenAI, Hugging Face, NVidia and more
  • Agent Framework: Build modular AI agents with access to tools/plugins, memory, and planning capabilities
  • Multi-Agent Systems: Orchestrate complex workflows with collaborating specialist agents
  • Plugin Ecosystem: Extend with native code functions, prompt templates, OpenAPI specs, or Model Context Protocol (MCP)
  • Vector DB Support: Seamless integration with Azure AI Search, Elasticsearch, Chroma, and more
  • Multimodal Support: Process text, vision, and audio inputs
  • Local Deployment: Run with Ollama, LMStudio, or ONNX
  • Process Framework: Model complex business processes with a structured workflow approach
  • Enterprise Ready: Built for observability, security, and stable APIs

Installation

First, set the environment variable for your AI Services:

Azure OpenAI:

export AZURE_OPENAI_API_KEY=AAA....

or OpenAI directly:

export OPENAI_API_KEY=sk-...

Python

pip install semantic-kernel

.NET

dotnet add package Microsoft.SemanticKernel
dotnet add package Microsoft.SemanticKernel.Agents.Core

Java

See semantic-kernel-java build for instructions.

Quickstart

Basic Agent - Python

Create a simple assistant that responds to user prompts:

import asyncio
from semantic_kernel.agents import ChatCompletionAgent
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion

async def main():
    # Initialize a chat agent with basic instructions
    agent = ChatCompletionAgent(
        service=AzureChatCompletion(),
        name="SK-Assistant",
        instructions="You are a helpful assistant.",
    )

    # Get a response to a user message
    response = await agent.get_response(messages="Write a haiku about Se