AI/TLDR

Semantic Kernel

Microsoft's model-agnostic SDK for building AI agents and multi-agent systems

Overview

Semantic Kernel is Microsoft's open-source SDK for building AI agents and multi-agent systems. It is model-agnostic, so you can connect it to OpenAI, Azure OpenAI, Hugging Face, NVIDIA, and local runtimes like Ollama, LM Studio, or ONNX. The same core concepts are available across Python, .NET, and Java.

It targets developers who want to add agents, tool-calling plugins, memory, and planning to their applications with stable APIs and enterprise concerns like observability and security in mind. You can start with a single chat assistant and grow into workflows where several specialist agents collaborate.

Note: the project's README states Semantic Kernel's successor is the Microsoft Agent Framework, which Microsoft positions as the production-ready path forward. Semantic Kernel remains usable, but new projects should check the official migration guide before committing.

What it does

  • Model-agnostic: connect to OpenAI, Azure OpenAI, Hugging Face, NVIDIA, and others
  • Agent framework for building agents with tools/plugins, memory, and planning
  • Multi-agent orchestration for workflows with collaborating specialist agents
  • Plugins from native code functions, prompt templates, OpenAPI specs, or MCP
  • Vector DB integrations including Azure AI Search, Elasticsearch, and Chroma
  • Local model deployment via Ollama, LM Studio, or ONNX; multimodal text, vision, and audio

Getting started

Set your AI service API key, install the SDK for your language, then create a basic chat agent. The examples below use Azure OpenAI.

Set your API key

Export the environment variable for your AI service before running your app.

bashbash
export AZURE_OPENAI_API_KEY=AAA....
# or, for OpenAI directly:
export OPENAI_API_KEY=sk-...

Install the SDK

Install the Python package with pip. For .NET, add the Microsoft.SemanticKernel packages instead.

bashbash
pip install semantic-kernel

Create a basic agent (Python)

Initialize a ChatCompletionAgent with instructions and get a response to a prompt.

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

async def main():
    agent = ChatCompletionAgent(
        service=AzureChatCompletion(),
        name="SK-Assistant",
        instructions="You are a helpful assistant.",
    )
    response = await agent.get_response(messages="Write a haiku about Semantic Kernel.")
    print(response.content)

asyncio.run(main())

.NET alternative

On .NET, add the packages with the dotnet CLI, then build a Kernel and a ChatCompletionAgent.

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

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Add a chat assistant with tool-calling plugins to an existing .NET, Python, or Java app
  • Orchestrate multiple specialist agents that collaborate on a multi-step workflow
  • Build a RAG-style assistant backed by a vector DB like Azure AI Search, Elasticsearch, or Chroma
  • Prototype agents against local models via Ollama or LM Studio without sending data to a cloud API

How Semantic Kernel compares

Semantic Kernel alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
AutoGPT★ 185kOne of the earliest autonomous agent projects, now a platform for building and running agents from reusable blocks and workflows.
Agno★ 40.8kA fast Python framework (formerly Phidata) for building agents with memory, tools, and multimodal inputs, plus a runtime for deploying them in production.
AgentGPT★ 36.2kAgentGPT lets you name a custom AI, give it a goal, and watch it plan tasks, run them, and learn from the results, all from a web browser.
LangGraph★ 35.2kA library from the LangChain team for building stateful, graph-based agent workflows with explicit control over steps, memory, and human-in-the-loop checkpoints.
Composio★ 28.9kComposio is an open-source SDK for Python and TypeScript that gives AI agents ready-made tools to act on real apps and APIs across many agent frameworks.
Semantic Kernel★ 28.2kMicrosoft's model-agnostic SDK for building AI agents and multi-agent systems
smolagents★ 27.9kA minimal agent library from Hugging Face where the model writes and runs Python code to call tools and complete tasks.
Mastra★ 25.3kA TypeScript framework for building AI agents and applications with workflows, RAG, memory, and observability built in.