OSS Agents JP
オープンソース AI エージェント 日本語ガイド
← 一覧へ
Semantic Kernel
OTHER

Semantic Kernel

Semantic Kernel

マルチプロバイダ対応のエンタープライズ向けマルチエージェント オーケストレーション フレームワーク。複数の LLM を統合し、AI エージェント・マルチエージェント システムの構築・デプロイをサポートします。

原文: Integrate cutting-edge LLM technology quickly and easily into your apps
#マルチエージェント#オーケストレーション#SDK#ai#artificial-intelligence#llm#openai#sdk
EDITOR'S TAKE

編集部メモ

後継 MAF へ舵を切ったマルチプロバイダ・マルチエージェント SDK

Semantic Kernel は Microsoft のマルチエージェント・オーケストレーション SDK。複数 LLM プロバイダ(OpenAI, Azure OpenAI, Hugging Face など)を統一インタフェースで扱え、複数エージェントの協調も可能です。すでに後継の Microsoft Agent Framework (MAF) 統合が進み、新規采用なら MAF 1.0 への検討も視野に。C#, Python, Java の多言語対応で、エンタープライズ規模でプロバイダロックインを避けたい組織に向きます。

USE CASES

こんな場面で使う

  • 複数の LLM プロバイダ(OpenAI, Azure OpenAI, Hugging Face, NVIDIA など)を一つの統一インタフェースで扱い、ベンダーロックインを回避しながら AI システムを構築・運用する
  • 営業エージェント・企画エージェント・カスタマーサポートエージェント など異なる役割の AI エージェントを協調させるマルチエージェント ワークフローを実装
  • Vector DB やエンタープライズサーチと連携させた RAG パイプラインをエージェント内に組み込み、知識ベースを活用した AI 推論を実現
DIFFERENTIATOR

類似ツールとの違い

OpenAI SDK や LangChain との違いは、**エンタープライズ対応度**と**多言語統一**にあります。OpenAI SDK は OpenAI 専門、LangChain は Python 中心ですが、Semantic Kernel/MAF は C#/Python/Java を標準サポートし、複数プロバイダを組織内で統一インタフェースで操作できます。Microsoft の長期サポート見通しも強みです。
CAVEAT

注意点・向かない用途

⚠️ 後継の Microsoft Agent Framework への統合がすでにアナウンスされており、新規采用なら MAF 1.0 採用を第一選択肢に。エンタープライズグレードの複雑性があり、小規模 POC には過度な投資になる可能性があります。
BEST FOR

向いている読者

エンタープライズ AI チームマルチエージェント構築者プロバイダ中立設計志向者

— OSS Agents JP 編集部による独自評価(Semantic Kernel に関する観察)

REPO STATS

リポジトリ統計

⭐ Stars
27.9k
🍴 Forks
4.6k
⚠️ Open Issues
298
🌿 Language
C#
📄 License
MIT
🕒 最終更新
2026.05.14 (2日前)
📅 公開日
2023.02.28
🌿 Branch
main
REFERENCE

公式ドキュメント(README)

本ハブの独自評価は上記「編集部メモ」が一次情報です。以下は GitHub README の参考転載(折りたたみ)。

📖 GitHub README の日本語訳を読む(AI 自動翻訳 / 参考情報)

— AI による自動翻訳 (2026.05.15 更新)。正確な情報は GitHub の原文 をご確認ください。

Semantic Kernel

重要

Semantic Kernel は現在 Microsoft Agent Framework になりました。Microsoft Agent Framework (MAF) は Semantic Kernel のエンタープライズ対応後継製品です。Microsoft Agent Framework はバージョン 1.0 として本番環境対応のリリースとして利用可能になりました。安定した API と長期サポートへのコミットメントがあります。単一のアシスタントを構築する場合でも、専門的なエージェントのフロートを調整する場合でも、Microsoft Agent Framework 1.0 は、エンタープライズグレードのマルチエージェント調整、マルチプロバイダーモデルサポート、および A2A と MCP 経由のクロスランタイム相互運用性を提供します。

Semantic Kernel と Agent Framework について詳しくは、こちらをご覧ください: Agent Framework ブログの Semantic Kernel と Microsoft Agent Framework と、Semantic Kernel マイグレーションガイド を試してみてください。

このエンタープライズ対応の調整フレームワークで、インテリジェント AI エージェントとマルチエージェントシステムを構築します

ライセンス: MIT Python パッケージ Nuget パッケージ Discord

Semantic Kernel とは?

Semantic Kernel はモデルに依存しない SDK で、開発者が AI エージェントとマルチエージェントシステムを構築、調整、デプロイできるよう支援します。シンプルなチャットボットを構築する場合でも、複雑なマルチエージェントワークフローを構築する場合でも、Semantic Kernel はエンタープライズグレードの信頼性と柔軟性を備えた必要なツールを提供します。

システム要件

  • Python: 3.10 以上
  • .NET: .NET 10.0 以上
  • Java: JDK 17 以上
  • OS サポート: Windows、macOS、Linux

主な機能

  • モデルの柔軟性: OpenAIAzure OpenAIHugging FaceNVidia などの組み込みサポートで任意の LLM に接続します
  • エージェントフレームワーク: ツール/プラグイン、メモリ、計画機能にアクセスできるモジュラー AI エージェントを構築します
  • マルチエージェントシステム: 協力する専門的なエージェントを使用して複雑なワークフローを調整します
  • プラグインエコシステム: ネイティブコード関数、プロンプトテンプレート、OpenAPI 仕様、または Model Context Protocol (MCP) で拡張します
  • ベクターDB サポート: Azure AI SearchElasticsearchChroma などとシームレスに統合します
  • マルチモーダルサポート: テキスト、ビジョン、オーディオ入力を処理します
  • ローカルデプロイ: OllamaLMStudio、または ONNX で実行します
  • プロセスフレームワーク: 構造化されたワークフロータプローチで複雑なビジネスプロセスをモデル化します
  • エンタープライズレディ: 可観測性、セキュリティ、安定した API 向けに構築されています

インストール

まず、AI サービスの環境変数を設定してください:

Azure OpenAI:

export AZURE_OPENAI_API_KEY=AAA....

または OpenAI 直接:

export OPENAI_API_KEY=sk-...

Python

pip install semantic-kernel

.NET

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

Java

semantic-kernel-java build の指示を参照してください。

クイックスタート

基本的な Agent - Python

ユーザープロンプトに応答する簡単なアシスタントを作成します:

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 Semantic Kernel.")
    print(response.content)

asyncio.run(main()) 

# Output:
# Language's essence,
# Semantic threads intertwine,
# Meaning's core revealed.

Basic Agent - .NET

using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Agents;

var builder = Kernel.CreateBuilder();
builder.AddAzureOpenAIChatCompletion(
                Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT"),
                Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"),
                Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY")
                );
var kernel = builder.Build();

ChatCompletionAgent agent =
    new()
    {
        Name = "SK-Agent",
        Instructions = "You are a helpful assistant.",
        Kernel = kernel,
    };

await foreach (AgentResponseItem<ChatMessageContent> response 
    in agent.InvokeAsync("Write a haiku about Semantic Kernel."))
{
    Console.WriteLine(response.Message);
}

// Output:
// Language's essence,
// Semantic threads intertwine,
// Meaning's core revealed.

プラグイン付きエージェント - Python

カスタムツール(プラグイン)と構造化された出力を使ってエージェントを強化します:

import asyncio
from typing import Annotated
from pydantic import BaseModel
from semantic_kernel.agents import ChatCompletionAgent
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion, OpenAIChatPromptExecutionSettings
from semantic_kernel.functions import kernel_function, KernelArguments

class MenuPlugin:
    @kernel_function(description="Provides a list of specials from the menu.")
    def get_specials(self) -> Annotated[str, "Returns the specials from the menu."]:
        return """
        Special Soup: Clam Chowder
        Special Salad: Cobb Salad
        Special Drink: Chai Tea
        """

    @kernel_function(description="Provides the price of the requested menu item.")
    def get_item_price(
        self, menu_item: Annotated[str, "The name of the menu item."]
    ) -> Annotated[str, "Returns the price of the menu item."]:
        return "$9.99"

class MenuItem(BaseModel):
    price: float
    name: str

async def main():
    # Configure structured output format
    settings = OpenAIChatPromptExecutionSettings()
    settings.response_format = MenuItem

    # Create agent with plugin and settings
    agent = ChatCompletionAgent(
        service=AzureChatCompletion(),
        name="SK-Assistant",
        instructions="You are a helpful assistant.",
        plugins=[MenuPlugin()],
        arguments=KernelArguments(settings)
    )

    response = await agent.get_response(messages="What is the price of the soup special?")
    print(response.content)

    # Output:
    # The price of the Clam Chowder, which is the soup special, is $9.99.

asyncio.run(main()) 

Agent with Plugin - .NET

using System.ComponentModel;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Agents;
using Microsoft.SemanticKernel.ChatCompletion;

var builder = Kernel.CreateBuilder();
builder.AddAzureOpenAIChatCompletion(
                Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT"),
                Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"),
                Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY")
                );
var kernel = builder.Build();

kernel.Plugins.Add(KernelPluginFactory.CreateFromType<MenuPlugin>());

ChatCompletionAgent agent =
    new()
    {
        Name = "SK-Assistant",
        Instructions = "You are a helpful assistant.",
        Kernel = kernel,
        Arguments = new KernelArguments(new PromptExecutionSettings() { FunctionChoiceBehavior = FunctionChoiceBehavior.Auto() })

    };

await foreach (AgentResponseItem<ChatMessageContent> response 
    in agent.InvokeAsync("What is the price of the soup special?"))
{
    Console.WriteLine(response.Message);
}

sealed class MenuPlugin
{
    [KernelFunction, Description("Provides a list of specials from the menu.")]
    public string GetSpecials() =>
        """
        Special Soup: Clam Chowder
        Special Salad: Cobb Salad
        Special Drink: Chai Tea
        """;

    [KernelFunction, Description("Provides the price of the requested menu item.")]
    public string GetItemPrice(
        [Description("The name of the menu item.")]
        string menuItem) =>
        "$9.99";
}
📖 GitHub README の原文を読む(English / 参考情報)

— GitHub から取得した原文。完全版は GitHub へ。

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

License: MIT Python package Nuget package Discord

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 Semantic Kernel.")
    print(response.content)

asyncio.run(main()) 

# Output:
# Language's essence,
# Semantic threads intertwine,
# Meaning's core revealed.

Basic Agent - .NET

using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Agents;

var builder = Kernel.CreateBuilder();
builder.AddAzureOpenAIChatCompletion(
                Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT"),
                Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"),
                Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY")
                );
var kernel = builder.Build();

ChatCompletionAgent agent =
    new()
    {
        Name = "SK-Agent",
        Instructions = "You are a helpful assistant.",
        Kernel = kernel,
    };

await foreach (AgentResponseItem<ChatMessageContent> response 
    in agent.InvokeAsync("Write a haiku about Semantic Kernel."))
{
    Console.WriteLine(response.Message);
}

// Output:
// Language's essence,
// Semantic threads intertwine,
// Meaning's core revealed.

Agent with Plugins - Python

Enhance your agent with custom tools (plugins) and structured output:

import asyncio
from typing import Annotated
from pydantic import BaseModel
from semantic_kernel.agents import ChatCompletionAgent
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion, OpenAIChatPromptExecutionSettings
from semantic_kernel.functions import kernel_function, KernelArguments

class MenuPlugin:
    @kernel_function(description="Provides a list of specials from the menu.")
    def get_specials(self) -> Annotated[str, "Returns the specials from the menu."]:
        return """
        Special Soup: Clam Chowder
        Special Salad: Cobb Salad
        Special Drink: Chai Tea
        """

    @kernel_function(description="Provides the price of the requested menu item.")
    def get_item_price(
        self, menu_item: Annotated[str, "The name of the menu item."]
    ) -> Annotated[str, "Returns the price of the menu item."]:
        return "$9.99"

class MenuItem(BaseModel):
    price: float
    name: str

async def main():
    # Configure structured output format
    settings = OpenAIChatPromptExecutionSettings()
    settings.response_format = MenuItem

    # Create agent with plugin and settings
    agent = ChatCompletionAgent(
        service=AzureChatCompletion(),
        name="SK-Assistant",
        instructions="You are a helpful assistant.",
        plugins=[MenuPlugin()],
        arguments=KernelArguments(settings)
    )

    response = await agent.get_response(messages="What is the price of the soup special?")
    print(response.content)

    # Output:
    # The price of the Clam Chowder, which is the soup special, is $9.99.

asyncio.run(main()) 

Agent with Plugin - .NET

using System.ComponentModel;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Agents;
using Microsoft.SemanticKernel.ChatCompletion;

var builder = Kernel.CreateBuilder();
builder.AddAzureOpenAIChatCompletion(
                Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT"),
                Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"),
                Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY")
                );
var kernel = builder.Build();

kernel.Plugins.Add(KernelPluginFactory.CreateFromType<MenuPlugin>());

ChatCompletionAgent agent =
    new()
    {
        Name = "SK-Assistant",
        Instructions = "You are a helpful assistant.",
        Kernel = kernel,
        Arguments = new KernelArguments(new PromptExecutionSettings() { FunctionChoiceBehavior = FunctionChoiceBehavior.Auto() })

    };


RELATED

同じカテゴリの他のツール