目次
この記事について
本記事は、Agent Builder を使用したデータストア参照型対話エージェントの作成に関する調査記録です。
やりたいこと
Agent Builder を用いたデータストア参照型対話エージェントの作成において、
データストアのファイル数が増加することで回答率が低下する問題への対処を進める。
前回の調査日記
あわせて読みたい


AI Agent開発日記 2025/03/21
この記事について 本記事は、Agent Builder を使用したデータストア参照型対話エージェントの作成に関する調査記録です。 やりたいこと Agent Builder を用いたデータス...
agentbuilder Tool OpenAPIのスキーマの形式を理解する
- やりたいこと
- agentbuilder Tool OpenAPIのスキーマの構造を軽く理解したい
スキーマの主な要素
- パスパラメーター
- /tools/{toolId}/execute の {toolId} のように、パスの一部を可変にする場合に利用する
- リクエストボディー
- POST, PUT, PATCH などでサーバーにデータを送信する場合に利用する
- レスポンスボディー
- APIからの応答としてクライアントにデータを返す場合に利用する
- HTTPメソッド
- APIの操作(取得、作成、更新、削除など) をHTTPメソッド (GET, POST, PUT, DELETE など)
- Content-Type
- リクエストボディとレスポンスボディのデータ形式 (MIMEタイプ) を指定する
構造についての詳しい説明
openapi: "3.0.0"
info:
title: Agent Tool API
version: "1.0.0"
paths:
/tools/{toolId}/execute: # パス (エンドポイント) の定義。{toolId} はパスパラメータ
post: # HTTPメソッド (POST)
summary: Tool実行API
description: 特定のToolを実行します。
parameters:
- in: path # パラメータの場所 (pathパラメータ)
name: toolId # パラメータ名
required: true # 必須パラメータ
description: 実行するToolのID
schema:
type: string # パラメータの型 (string)
requestBody: # リクエストボディの定義 (POST, PUT, PATCH など)
required: true
content:
application/json: # リクエストボディのContent-Type (JSON)
schema:
type: object
properties:
bmid: # リクエストボディのプロパティ例 (bmid)
type: string
description: BMID (Business Model ID)
command: # リクエストボディのプロパティ例 (コマンド)
type: string
description: 実行するコマンド
options: # その他のオプションパラメータ例
type: object
description: Tool実行時のオプション
properties:
param1:
type: string
description: オプションパラメータ1
param2:
type: integer
description: オプションパラメータ2
required: # 必須リクエストボディプロパティ
- bmid
- command
responses: # レスポンスの定義
'200': # HTTPステータスコード (200 OK)
description: 成功時のレスポンス
content:
application/json: # レスポンスボディのContent-Type (JSON)
schema:
type: object
properties:
result: # レスポンスボディのプロパティ例 (result)
type: string
description: Tool実行結果
status: # レスポンスボディのプロパティ例 (status)
type: string
enum: [ "success", "failure" ] # 列挙型
description: 実行ステータス
'400': # HTTPステータスコード (400 Bad Request)
description: リクエストエラー
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: エラーメッセージ
参考にした記事
INTERNET Watch


Google「Vertex AI Agent Builder」、ローコードでマルチエージェント対応の“未来感”あふれるAIツール開発...
2024年4月10日、Google Cloud Next '24 in Las VegasでAIエージェントの開発環境「Vertex AI Agent Builder」(以下、Agent Builder)が発表された。社内文書を検索するR...
その他AgentBuilder Tool OpenAPIについての記事
Semantic Kernel


Empowering AI Agents with Tools via OpenAPI: A Hands-On Guide with Microsoft Semantic Kernel Agents ...
Today the Semantic Kernel team is happy to welcome back our guest author, Akshay Kokane. We will turn it over to him to dive into his recent Medium article on S...