📘
本APIはベータ版です。エージェントの作成・更新を行うことができます。
本APIはエージェントを1つ以上作成済みのアカウントのみ利用が可能です。
https://api-mebo.dev
すべてのAPIリクエストには認証が必要です。管理画面で発行したAPIキーを使用してください。
X-API-Key: your-api-key-here
APIキーの発行は管理画面から行えます。
POST /admin/{管理者のuid}/agent
PUT /admin/{管理者のuid}/agent
管理者のUIDは管理画面から行えます。
パラメータ | 型 | 説明 |
---|
uid | string | 管理者のユーザーID |
ヘッダー名 | 必須 | 説明 |
---|
X-API-Key | ○ | 管理画面で発行したAPIキー |
Content-Type | ○ | application/json |
以下のJSONオブジェクトをリクエストボディとして送信します。
フィールド | 型 | 必須 | 説明 |
---|
agent | Object | ○ | エージェント設定 |
webhooks | Array[Object] | - | Webhook設定の配列 |
issueAgentApiKey | boolean | - | エージェントAPIキーの発行要否 |
フィールド | 型 | 必須 | 説明 |
---|
id | string | △ | エージェントID(更新時のみ必須) |
displayName | string | ○ | 表示名(100文字以内) |
description | string | ○ | 説明(120文字以内) |
photoUrl | string | ○ | アバター画像URL |
serviceURL | string | - | サービスURL(https://から始まる必要あり) |
providerName | string | ○ | 提供者名(60文字以内) |
scope | string | ○ | "public" または "private" |
useAIResponse | boolean | - | AI応答の使用有無(デフォルト: true) |
フィールド | 型 | 必須 | 説明 |
---|
llm | string | ○ | 使用するLLM |
temperature | number | - | 温度(0-1) |
prompt | string | - | システムプロンプト(6000トークン以内) |
フィールド | 型 | 必須 | 説明 |
---|
stream | boolean | - | ストリーミング応答の使用有無 |
shouldUseHtmlResponse | boolean | - | HTML応答の使用有無 |
shouldAutoGenerateUI | boolean | - | UI自動生成の使用有無 |
ruleBasedThresholdLevel | number | - | ルールベース応答の閾値(0-3)。値が大きいほど厳密にマッチ。 |
フィールド | 型 | 必須 | 説明 |
---|
knowledgeDataStore.useKnowledgeDataStore | boolean | - | ナレッジデータストアの使用有無 |
knowledgeDataStore.knowledgeDataStoreNumCandidates | number | - | 候補数(0-30) |
knowledgeDataStore.knowledgeDataStoreCandidateScoreThreshold | number | - | スコア閾値(0-1) |
searchQueryPrompt | string | - | 検索クエリー生成プロンプト(1500文字以内) |
フィールド | 型 | 必須 | 説明 |
---|
name | string | ○ | Webhook名 |
method | string | ○ | HTTPメソッド(GET/POST/PUT/DELETE) |
url | string | ○ | エンドポイントURL |
headers | Array[Object] | - | リクエストヘッダー
[ { "key":"<任意のキー>", "value":"<任意の値>" } ] |
authHeaders | Array[Object] | - | 認証用リクエストヘッダー
[ { "key":"<任意のキー>", "value":"<任意の値>" } ] |
trigger | Object | ○ | トリガー設定 |
useResponseInPrompt | boolean | - | レスポンスをプロンプトに含めるか |
isEnable | boolean | - | Webhookの有効/無効 |
gpt-3.5-turbo
gpt-3.5-turbo-16k
gpt-3.5-turbo-0613
gpt-3.5-turbo-0125
gpt-4
gpt-4-0613
gpt-4-32k
gpt-4-turbo
gpt-4-0125-preview
gpt-4-turbo-vision
gpt-4-vision-preview
gpt-4o
gpt-4o-mini
o1-preview
o1-mini
palm2
gemini-pro
gemini-1.5-pro-latest
gemini-1.5-flash
claude-3-sonnet-20240229
claude-3-opus-20240229
claude-3-haiku-20240307
claude-3-5-sonnet-20240620
llama3-8b-8192
llama3-70b-8192
llama-3.1-8b-instant
llama-3.1-70b-versatile
llama-3.1-405b-reasoning
mixtral-8x7b-32768
gemma-7b-it
custom-azure-openai
curl -X POST "https://api-mebo.dev/admin/user123/agent" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"agent": {
"displayName": "サポートボット",
"description": "カスタマーサポート用チャットボット",
"photoUrl": "https://example.com/bot.png",
"providerName": "カスタマーサービス部",
"scope": "private",
"useAIResponse": true,
"autoResponseSettings": {
"stream": true,
"shouldUseHtmlResponse": false,
"shouldAutoGenerateUI": false,
"ruleBasedThresholdLevel": 0
},
"knowledge": {
"knowledgeDataStore": {
"useKnowledgeDataStore": true,
"knowledgeDataStoreNumCandidates": 5,
"knowledgeDataStoreCandidateScoreThreshold": 0.8,
"shouldSendDataStoreResultEmail": true
}
},
"llmSettings": {
"llm": "gpt-4o",
"temperature": 0.7,
"prompt": "あなたはカスタマーサポートアシスタントです..."
}
},
"webhooks": [
{
"name": "注文情報取得",
"method": "GET",
"url": "https://api.example.com/orders",
"headers": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"trigger": {
"triggerType": 0,
"condition": 2,
"conditionValues": ["注文", "お届け"]
},
"isEnable": true,
"useResponseInPrompt": true,
"promptPrefix": "注文情報:"
}
],
"issueAgentApiKey": true
}'
curl -X PUT "https://api-mebo.dev/admin/user123/agent" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"agent": {
"id": "agent-789",
"displayName": "サポートボット改",
"description": "アップデート版サポートボット",
"photoUrl": "https://example.com/bot.png",
"providerName": "カスタマーサービス部",
"scope": "private",
"useAIResponse": true,
"autoResponseSettings": {
"stream": true
},
"knowledge": {
"knowledgeDataStore": {
"useKnowledgeDataStore": true,
"knowledgeDataStoreNumCandidates": 5,
"knowledgeDataStoreCandidateScoreThreshold": 0.8
}
},
"llmSettings": {
"llm": "gpt-4o",
"temperature": 0.8,
"prompt": "更新されたプロンプト..."
}
}
}'
{
"id": "生成されたエージェントID",
"issuedAgentApiKey": "発行されたAPIキー(issueAgentApiKey: trueの場合のみ)"
}
- 必須パラメータの不足
- バリデーション違反
- エージェントが既に存在する(作成時)
- エージェント制限超過
- displayName: 100文字以内
- description: 120文字以内
- providerName: 60文字以内
- システムプロンプト: 6000トークン以内
- 検索クエリプロンプト: 1500トークン以内
- エージェント数
- シナリオ数
- Webhook数
は各プランの制限に従います。
- Webhook作成時は300ms以上の間隔が必要
- serviceURLは https:// から始まる必要あある
- knowledgeDataStoreNumCandidates は0-30の範囲
- knowledgeDataStoreCandidateScoreThreshold は0-1の範囲