Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Advanced Tool Use for AgentCore Gateway with Ag...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for matsukada matsukada
February 17, 2026
140

Advanced Tool Use for AgentCore Gateway with AgentCore

JAWS-UG AI/ML支部+東京支部コラボ: Bedrock Night 2026 ~AIエージェント"構築"元年スペシャル!~での登壇資料です。

https://jawsug-ai.connpass.com/event/381110/

Avatar for matsukada

matsukada

February 17, 2026
Tweet

More Decks by matsukada

Transcript

  1. ©Mitsubishi Electric Corporation Advanced Tool Use for AgentCore Gateway Powered

    by AgentCore 三菱電機株式会社 AXイノベーションセンター 塚田 真規
  2. ©Mitsubishi Electric Corporation 自己紹介 2 塚田 真規 Masaki Tsukada 三菱電機株式会社

    デジタルイノベーション事業本部 AXイノベーションセンター • AWS Community Builder (AI Engineering) • 2024/2025 Japan AWS All Certifications Engineers • JAWS-UG AI/ML支部運営
  3. ©Mitsubishi Electric Corporation Advanced Tool Use 3 Anthropicが提唱、提供 動的かつ効率的に、信頼性の高いツール呼び出しを実現する手法 Tool

    Search Tool ツールが必要なときに、関連ツールを検索して読み込む オンデマンドに、検索したツールだけを読み込むことで、コンテキストを節約 Programmatic Tool Calling 複数ツールをオーケストレーションするコードを生成し、セキュアな環境で実行する ツールの中間結果によるコンテキスト汚染、推論オーバーヘッドを削減 Tool User Examples ツール定義に具体的な使用サンプルを記入する 適切なパラメータによるツール実行で効率性が向上
  4. ©Mitsubishi Electric Corporation Tool Search Tool 4 ツール2 AIエージェント ツール300

    ツール1 AgentCore Gateway … 起動時にツールリスト取得 ツール情報×300 ツール情報だけで コンテキストが圧迫される… … 欲しいツールを 都度検索 “ツールX”情報 AgentCore Gateway セマンティック検索ツールの活用 … ツールリスト取得 よく使う おすすめツール AgentCore Gateway Interceptorによるフィルタリング “必要なとき”に”必要なツール”だけを読み込む
  5. ©Mitsubishi Electric Corporation 5 「x_amz_bedrock_agentcore_search」 AgentCore Gateway 「~ができるツールある?」 「こんなツールあるよ!」 •

    最大10件 • 判定基準やスコアは非公開 *2025/02時点 AgentCore Gateway ツール検索ツールの活用 AIエージェント AgentCore Gatewayが提供するセマンティック検索ツール AIエージェント ツール検索ツール • 必要最小限のツールのみをAIエージェントに公開 • 独自基準によるリランキングが可能 AgentCore Gateway 1. AgentCore Gatewayによるツール検索 2. リランキング • 類似度計算 • ソート 3. 指定ツール数返却 より柔軟性を持たせるために
  6. ©Mitsubishi Electric Corporation 6 AgentCore Gateway Interceptorによるフィルタリング AgentCore Gateway Interceptor

    • 呼び出しごとにLambdaで実装したカスタムコードを実行 • RequestとResponseそれぞれに設定可能 AIエージェント AgentCore Gateway Request interceptor Response interceptor … 連携ツール DynamoDB お気に入り/おすすめ ツールリスト ①ツール一覧取得 (tools/list) ②ツール一覧取得 (tools/list) ③全ツール情報 ④Interceptorによる ツールフィルタリング ⑤お気に入り/おすすめ ツール情報
  7. ©Mitsubishi Electric Corporation Programmatic Tool Calling 7 ツールβ AIエージェント ツールγ

    ツールα AgentCore Gateway コンテキストが 不要なデータで… データベース Web検索 テキスト要約 ファイルパス テキスト要約 大量の検索結果 コーディングエージェント+AgentCore Interpreter コーディング エージェント オーケストレーションコード • ツール情報取得 • ツール実行コード生成 AgentCore Code Interpreter AIエージェント
  8. ©Mitsubishi Electric Corporation オーケストレーションコードの生成 8 クエリ:AgentCore Runtimeの最新アップデート機能を Web調査して、その結果要約をストレージに保存して { "steps":

    [ { "id": "step1", "tool_name": "tavily-search-server___tavily_search", "arguments": { "input": "AgentCore Runtime latest updates features", "max_results": 5 }, "dependencies": [], "output_type": "list" }, { "id": "step2", "tool_name": "summarization-server___summarize", "arguments": { "texts": {"ref": "step1"} }, "dependencies": ["step1"], "output_type": "string" }, … ②ツール実行計画作成 # Step 1: Tavily検索を実行 step1_args = { 'input': 'AgentCore Runtime latest updates features', 'max_results': 5 } step1_result = call_tool('tavily-search-server___tavily_search', step1_args) results['step1'] = extract_mcp_result(step1_result) # Step 2: 検索結果から要約を生成 # step1の結果がリスト形式の場合、contentフィールドを抽出 if isinstance(results['step1'], list): texts_to_summarize = [item.get('content', '') for item in results['step1'] if isinstance(item, dict) and 'content' in item] else: texts_to_summarize = [str(results['step1’])] 'texts': texts_to_summarize } step2_result = call_tool('summarization-server___summarize', step2_args) …… ③オーケストレーションコード生成 AgentCore Gateway ①ツール取得 tavily_search summarize save_article … list/tools コーディング エージェント オーケストレーションコード • ツール情報取得 • ツール実行コード生成
  9. ©Mitsubishi Electric Corporation オーケストレーションコードの実行 9 AgentCore Code Interpreter VPC Endpoints

    ①サンドボックス AgentCore Gateway AgentCore Code Interpreter ②パブリック AgentCore Code Interpreter ③VPC インターネット AgentCore Code Interpreter AgentCore Gateway AgentCore Gateway AIエージェントと独立した環境で、 PythonやTypeScriptを実行する環境
  10. ©Mitsubishi Electric Corporation まとめ 10 • Anthropicが提唱するAdvanced Tool UseをAgentCoreで実現 •

    Tool Search Tool • Programmatic Tool Calling ✓ Tool Search Tool • AgentCore Gatewayセマンティック検索ツールの活用 • AgentCore Gateway Interceptorによるフィルタリング ✓ Programmatic Tool Calling • サブエージェントによるツール実行コードの生成 • AgentCore Interpreterによるコード実行