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

Semantic Kernel

Semantic Kernel

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

#マルチエージェント#オーケストレーション#SDK
EDITOR'S TAKE

編集部メモ

Microsoft Agent Framework への移行期、選択のタイミングが重要

Semantic Kernel は複数の LLM プロバイダを統合し、マルチエージェントシステムを構築するための SDK です。.NET/Python/Java をサポートし、Azure OpenAI や Hugging Face など多様なモデルに対応。Vector DB やプラグインエコシステムも充実しており、エンタープライズシステムへの AI 埋め込みに適しています。ただし README で Microsoft Agent Framework への移行が明示されており、新規採用の際は後継フレームワークの評価が必須です。既存 .NET 資産の強化には有効ですが、プロダクト戦略を要確認。

USE CASES

こんな場面で使う

  • Azure OpenAI や複数 LLM をバックエンドにしたマルチエージェント ワークフロー構築
  • 既存 .NET アプリケーションへ AI 機能を統合し、プラグインで拡張可能なシステム化
  • Vector DB と組み合わせた社内ナレッジベース検索とエージェント連携の実装
DIFFERENTIATOR

類似ツールとの違い

LangChain(Python 中心、多言語対応に後れ)や AutoGen(対話型マルチエージェント特化)と比べ、Semantic Kernel は Microsoft エコシステム(Azure OpenAI、Entra ID、M365)との統合が深く、エンタープライズ環境での一元管理や既存 .NET 投資の活用に強みがあります。
CAVEAT

注意点・向かない用途

⚠️ 開発方針が Microsoft Agent Framework に移行中のため、新規プロジェクトは後継フレームワークの導入を検討すべき段階です。Microsoft 以外の LLM プロバイダとの統合は相対的に限定的。
BEST FOR

向いている読者

Microsoft / Azure エコシステムに投資した組織既存 .NET 資産に AI を統合したいエンタープライズマルチエージェント + RAG の実務的な実装者

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

REPO STATS

リポジトリ統計

⭐ Stars
-
🍴 Forks
-
⚠️ Open Issues
-
🌿 Language
-
📄 License
-
🕒 最終更新
-
📅 公開日
-
🌿 Branch
-
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";
}
RELATED

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