Slide 1

Slide 1 text

Microsoft Season of Agent AI エージェントの使用開始

Slide 2

Slide 2 text

AI エージェントの使用開始 Takas@DevTakas Microsoft MVP Developer Technologies,M365

Slide 3

Slide 3 text

AI Agentとは Chapter1

Slide 4

Slide 4 text

AI Agent 指定された目標に対してどのような手順を実施 するか事前に知らずに作業ができる半自律的な ソフトウェア

Slide 5

Slide 5 text

提供されたビジネスプロセスの推論 コンテキストを取得してプロセスを完了する エージェントは、次の3つのことを達成する。 アクションを実行する

Slide 6

Slide 6 text

アクション(ツール)  ユーザーの入力と環境要因に合わせてタスクの自動化を行う  【例】経費精算エージェント  企業の経費精算ルールのドキュメントに基づく質問への回答(データの参照)  企業の経費精算作業の自動化(実行ツールの実行)  請求金額に基づく処理の実行(実行ツールの実行) なにができるのか 指示 AIモデル データ 実行ツール

Slide 7

Slide 7 text

 ルーチンタスクの自動化  定義された処理(ツール)の呼び出し  意思決定の強化  膨大な専門的な情報をベースにした分析情報を提供することで意思決定を強化する  生成AIモデルで情報をベースに文章を生成することで自然言語で意思決定をサポート可能に  スケーラビリティー  これらの対応可能なリソースをスケール可能。クラウドであればその効果はさらに高くなる  24時間365日の対応  人の対応が発生しないため24/365の対応が可能となる なにができるのか

Slide 8

Slide 8 text

 Azure AI Foundary Agent Service  Open AI Assistants API  Semantic Kernel  Auto Gen  Copilot Studio  Swarm  LangGraph/LangChain AI Agentの作り方

Slide 9

Slide 9 text

AI Agentを体験する Chapter2

Slide 10

Slide 10 text

Demo – Contoso Sales Agent Azure AI Agent Service で構築されたエージェント (デモ 1)

Slide 11

Slide 11 text

デモアプリの仕組み Chapter2

Slide 12

Slide 12 text

Azure AI Foundry Agent Service AIエージェントを安全に構築、デプロイ、拡張 迅速な開発と自動化 広範なデータ接続 柔軟なモデル選 択 エンタープライズグ レードのセキュリティ Azure AI Foundry GA

Slide 13

Slide 13 text

Azure AI Foundry

Slide 14

Slide 14 text

Azure AI Foundry Agent Serviceの構成 Hub Project Service その他

Slide 15

Slide 15 text

デモのソリューションアーキテクチャ アクション (ツール) Function Calling Code Interpritor ファイル 検索 Bing Search による グラインディング Azure AI エージェント サービス 指示 モデル Contoso 営業エージェント アプリ UI クエリ機能

Slide 16

Slide 16 text

ユーザー定義関数を入力として 構造化された出力を生成 Function Calling

Slide 17

Slide 17 text

2023年4月の売 上はどのくら いでしたか? Function Calling 命令 あなたは Contoso の販売分析エージェントです。提供されている機能を使用し て、このアプリからすべての販売データを取得します。 SQL クエリを記述する ときは、データベース {metadata} を使用します。 名前 = async_fetch_sales_data_ using_sqlite_query' args = { "query": "売上から収益を選 択 WHERE 月 = 4 かつ 年 = 2023" } 利用者 LLM 機能

Slide 18

Slide 18 text

 LLM外部の役割や機能を呼び出すことができる  WebAPIの呼び出し、Databaseへの問い合わせなどなど  LLMを介して広範な作業が実現可能となる  データの呼び出しだけでなく登録など  Azure AI Foundry Agent Serviceでは「ツール」の領域 Function (あるいはTools) Calling 指示 LLM Tools 検索 登録

Slide 19

Slide 19 text

ラボ 1 デモ 動的SQL生成

Slide 20

Slide 20 text

 サンドボックス環境でPythonコードを記述して実行する  アップロードされたファイルの解析や解説などが可能に  実行ファイルなどなくても複雑な処理ができるなどが魅力 コードインタープリター 指示 LLM Pythonコードの 実行

Slide 21

Slide 21 text

ラボ 2 デモ コードインタープリター

Slide 22

Slide 22 text

 ファイルの追加やBing/Azure Searchとの連携  LLM外の外部情報をAIの機能に組み込むことが可能に  Bing Searchなどをくみこむことができる  従量課金などのサブスクリプションじゃないと利用できないので注意 検索

Slide 23

Slide 23 text

ラボ 3 デモ ファイル検索によるグラウンディング

Slide 24

Slide 24 text

AI エージェント サービスの動作 ステップ 1: エージェントを作成 ステップ 2: スレッドを作成 ステップ 3: Agent を実行 ステップ 5: 実行ステータスを確認 ステップ 6: エージェントの応答を 表示 エージェント Contoso 営業担当者 手順: Contoso の高度な販売分析 エージェントであり、販売データ に関するユーザーの問い合わせを 支援することを専門としています Run 2 モデル ツール (オプション) ファイル検索 コードインタープリター Bing検索 Microsoft SharePoint Function Calling Microsoft Fabric Azure AI Search Azure Logic Apps Azure Functions OpenAPI 3.0指定ツール User 地域別の総売上高を教 えてください Agent 以下はその売上です。 ヨーロッパ: $15478.00 アメリカ:$ 78792.00 Run1 1 Function Calling SQLite DB のクエリ メッセージを作成 2 お客様のデータ (オプション) User 円グラフで表示 Agent Code Interpitor 円グラフを作成 する メッセージを作成 2 1 Thread 売上分析 Azure AI Search ローカルまたは Azure BLOB

Slide 25

Slide 25 text

 Azure.AI.Projectsを使用してAgentの作成を行う  同じくライブラリを利用してThreadの作成を行う ラボのコード構成について agent = await agentClient.CreateAgentAsync( model: ModelName, name: "Constoso Sales AI Agent", instructions: instructions, tools: tools, temperature: temperature, toolResources: toolResources ); thread = await agentClient.CreateThreadAsync();

Slide 26

Slide 26 text

 Azure.AI.Projectsを使用してAgentの作成を行う  同じくライブラリを利用してThreadの作成を行う ラボのコード構成について agent = await agentClient.CreateAgentAsync( model: ModelName, name: "Constoso Sales AI Agent", instructions: instructions, tools: tools, temperature: temperature, toolResources: toolResources ); thread = await agentClient.CreateThreadAsync();

Slide 27

Slide 27 text

 Azure.AI.Projectsを使用してAgentの作成を行う ラボのコード構成について protected virtual async Task CreateInstructionsAsync() { // コードインタープリターで使用するファイル名 string instructionsFile = Path.Combine(SharedPath, "instructions", InstructionsFileName); string instructions = File.ReadAllText(instructionsFile); // SQLiteを使用したDatabase接続 string databaseSchema = await SalesData.GetDatabaseInfoAsync(); instructions = instructions.Replace("{database_schema_string}", databaseSchema); return instructions; } agent = await agentClient.CreateAgentAsync( model: ModelName, name: "Constoso Sales AI Agent", instructions: instructions, //ここで指定 tools: tools, temperature: temperature, toolResources: toolResources );

Slide 28

Slide 28 text

 Instructionで独自関数はインタプリターの関数を指定 ラボのコード構成について protected virtual async Task CreateInstructionsAsync() { // コードインタープリターで使用するファイル名 string instructionsFile = Path.Combine(SharedPath, "instructions", InstructionsFileName); string instructions = File.ReadAllText(instructionsFile); // SQLiteを使用したDatabase接続 string databaseSchema = await SalesData.GetDatabaseInfoAsync(); instructions = instructions.Replace("{database_schema_string}", databaseSchema); return instructions; } agent = await agentClient.CreateAgentAsync( model: ModelName, name: "Constoso Sales AI Agent", instructions: instructions, //ここで指定 tools: tools, temperature: temperature, toolResources: toolResources );

Slide 29

Slide 29 text

 Toolの指定と作成 ラボのコード構成について agent = await agentClient.CreateAgentAsync( model: ModelName, name: "Constoso Sales AI Agent", instructions: instructions, tools: tools, //ここで指定 temperature: temperature, toolResources: toolResources ); private IEnumerable InitialiseTools() => [ new FunctionToolDefinition( name: nameof(SalesData.FetchSalesDataAsync), description: "This function is used to answer user questions about Contoso sales data by executing SQLite qu… parameters: BinaryData.FromObjectAsJson(new { Type = "object", Properties = new { Query = new { Type = "string", Description = "The input should be a well-formed SQLite query to… } }, Required = new [] { "query" } }, new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }) ), ..IntialiseLabTools() ];

Slide 30

Slide 30 text

Appendix Chapter 3

Slide 31

Slide 31 text

 Azure AI Foundary Agent Service GA  マルチエージェント機能  MCP A2A (Agent to Agent)の対応  Visual Studio Code拡張機能の追加  トレース機能の追加 Microsoft Build 2025で発表された新要素

Slide 32

Slide 32 text

AI AgentからMCPを利用する 他AI Agent Prompt Resources Tools MCP MCP Client Chat Client 他Agent

Slide 33

Slide 33 text

まとめ  AIをより便利に効率よく業務に適した利用をするためのAgent  Azure AI Foundry Agent ServiceでAI Agentを簡単に作成できる  AI Agentのツールを利用することで様々なことが可能になる