AI Actions
Section titled “AI Actions”AI Actions は、Knowledge Base からの質問への回答を超えて、AI Agent の機能を拡張します。会話中に特定の状況を検出したときに AI が実行すべき トリガーされる動作 を定義できます。
AI Actions でできること:
- HTTP Request Actions — トリガーされたときに外部 API を呼び出します。たとえば、バックエンドで注文ステータスを確認したり、サポートチケットを作成したり、アカウント情報を検索したりできます。すべて会話中に実行されます。
- MCP アクション: Model Context Protocol サーバーに接続し、高度なツール連携を実現します(例:Shopify の商品検索、カスタムデータベースクエリ)。
典型的なユースケース:
- 会話中に、バックエンドシステムからリアルタイムの情報(注文ステータス、アカウント詳細、在庫)を検索する
- 会話のコンテキストに基づいて、外部システムでチケットを作成したり、CRM レコードを更新したり、ワークフローをトリガーしたりする
- 商品カタログを照会して、パーソナライズされたレコメンドを提供する
各アクションには name、description(HTTP Request Actions では、説明が AI にいつトリガーするかを伝えます)、およびタイプ固有の設定があります。アクションは API 経由で個別に有効化・無効化できます。アクションは Quickchat Dashboard で作成され、完全に設定されます。API は list、update(有効化・無効化)、delete の操作に加えて、MCP アクションを作成・設定する専用エンドポイントも提供します。
List All AI Actions
Section titled “List All AI Actions”GET https://app.quickchat.ai/v1/api/ai_actions
curl https://app.quickchat.ai/v1/api/ai_actions \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( url="https://app.quickchat.ai/v1/api/ai_actions", headers={"Authorization": "Bearer <API_TOKEN>"},)data = response.json()Response 200 OK
[ { "id": 1, "name": "Check Order Status", "description": "Look up order status when customer asks about their order.", "is_active": true, "type": "http_request", "icon": null, "icon_color": null, "is_valid": true }]| Field | Description |
|---|---|
id integer | AI Action の識別子 |
name string | 表示名 |
description string | アクションがトリガーされるタイミング |
is_active boolean | 有効かどうか |
type string | "http_request"、"remote_mcp"、"shopify_remote_mcp"、または "knowledge_base" |
icon string or null | アイコン識別子 |
icon_color string or null | アイコンの色 |
is_valid boolean | 正しく設定されているかどうか |
Update AI Action
Section titled “Update AI Action”PATCH https://app.quickchat.ai/v1/api/ai_actions/{action_id}
Request Body
| Parameter | Description |
|---|---|
is_active boolean | アクションの有効化 / 無効化 |
icon string | アイコン識別子(最大 200 文字) |
icon_color string | アイコンの色(最大 50 文字) |
curl -X PATCH https://app.quickchat.ai/v1/api/ai_actions/1 \ -H 'Authorization: Bearer <API_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{"is_active": false}'import requests
response = requests.patch( url="https://app.quickchat.ai/v1/api/ai_actions/1", headers={"Authorization": "Bearer <API_TOKEN>"}, json={"is_active": False},)data = response.json()Response 200 OK — 更新された AI Action のスナップショットを返します。
Delete AI Action
Section titled “Delete AI Action”DELETE https://app.quickchat.ai/v1/api/ai_actions/{action_id}
curl -X DELETE https://app.quickchat.ai/v1/api/ai_actions/1 \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.delete( url="https://app.quickchat.ai/v1/api/ai_actions/1", headers={"Authorization": "Bearer <API_TOKEN>"},)Response 200 OK(空のボディ)
Create MCP Action
Section titled “Create MCP Action”POST https://app.quickchat.ai/v1/api/ai_actions/remote_mcp
リモート MCP サーバーを MCP アクションとして AI エージェントに接続します。write_all スコープ付きの API トークンが必要です(API トークンには Business プラン以上が必要です)。
Request Body
| Parameter | Description |
|---|---|
remote_mcp_url string, required | MCP サーバーの URL。https:// が必須で、プライベートまたは内部ネットワークアドレスに解決される URL は拒否されます |
headers array, required | サーバーに送信する接続ヘッダー(例:静的な Authorization トークン)。各エントリは {"id", "name", "value"} で、id には任意の一意な文字列を指定します。不要な場合は [] を送信します |
allowed_tools array, required | ツールごとのスイッチ。各エントリは {"name", "is_active"} です。[] を送信すると、ツールの利用可否は default_tool_is_active に委ねられます |
name string | アクション一覧に表示される名前(最大 100 文字)。デフォルトはサーバーのホスト名から導かれたラベルです |
description string | アクション一覧に表示される説明(最大 2500 文字) |
icon string | アイコン識別子(最大 200 文字) |
icon_color string | アイコンの色(最大 50 文字) |
name と description は運用者向けのラベルです。ダッシュボードでアクションを識別するためのもので、AI がこれらを読むことはありません。AI は MCP サーバー自身が公開するツールの説明に基づいて動作します。
curl -X POST https://app.quickchat.ai/v1/api/ai_actions/remote_mcp \ -H 'Authorization: Bearer <API_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "remote_mcp_url": "https://mcp.example.com/mcp", "headers": [ {"id": "h-1", "name": "Authorization", "value": "Bearer <SERVER_TOKEN>"} ], "allowed_tools": [], "name": "Example MCP" }'import requests
response = requests.post( url="https://app.quickchat.ai/v1/api/ai_actions/remote_mcp", headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "remote_mcp_url": "https://mcp.example.com/mcp", "headers": [ {"id": "h-1", "name": "Authorization", "value": "Bearer <SERVER_TOKEN>"} ], "allowed_tools": [], "name": "Example MCP", },)data = response.json()Response 201 Created
{ "id": 2, "name": "Example MCP", "description": "Connected MCP server", "is_active": false, "type": "remote_mcp", "icon": "FaMixcloud", "icon_color": "#EF4444", "is_valid": true, "validation_issues": [], "remote_mcp_url": "https://mcp.example.com/mcp", "remote_mcp_auth_token": "", "default_tool_is_active": true, "allowed_tools": [], "headers": [ {"id": 10, "name": "Authorization", "value": "Bearer <SERVER_TOKEN>"} ], "oauth": null, "recommended_tools": []}| Field | Description |
|---|---|
remote_mcp_url string | 接続された MCP サーバーの URL |
default_tool_is_active boolean | allowed_tools に載っていないツールを使用してよいかどうか |
allowed_tools array | ツールごとのスイッチ {"name", "is_active"} |
headers array | 保存されている接続ヘッダー |
remote_mcp_auth_token string or null | 静的トークン用のレガシーフィールド。この API では設定できません。認証情報は headers で渡してください |
oauth object or null | OAuth サインインで接続されたサーバーの認可ステータス(それ以外は null) |
recommended_tools array | Quickchat が調整したプロファイルを持つサーバーに対して Quickchat が推奨するツール名(読み取り専用) |
validation_issues array | 失敗した設定チェックの名前。is_valid が true のときは空です |
残りのフィールドは List All AI Actions と同じです。
アクションは is_active: false で作成されます。Quickchat が調整したプロファイルのないサーバーでは、さらに default_tool_is_active: true で始まるため、返信時に検出されたすべてのツールは、制限するまで許可されます。アクションをオンにするには、上記の Update AI Action エンドポイントを使い、PATCH /v1/api/ai_actions/{action_id} に {"is_active": true} を送信します。
Get MCP Action Configuration
Section titled “Get MCP Action Configuration”GET https://app.quickchat.ai/v1/api/ai_actions/{action_id}/remote_mcp
curl https://app.quickchat.ai/v1/api/ai_actions/2/remote_mcp \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( url="https://app.quickchat.ai/v1/api/ai_actions/2/remote_mcp", headers={"Authorization": "Bearer <API_TOKEN>"},)data = response.json()Response 200 OK — MCP 固有の設定を、上記の作成レスポンスと同じ形式で返します。
Update MCP Action Configuration
Section titled “Update MCP Action Configuration”PATCH https://app.quickchat.ai/v1/api/ai_actions/{action_id}/remote_mcp
すべてのフィールドは省略可能で、送信したフィールドだけが変更されます。
Request Body
| Parameter | Description |
|---|---|
remote_mcp_url string | 新しいサーバー URL(作成時と同じ検証が行われます)。OAuth で接続されたサーバーの URL を変更すると、保存された認可が消去され、アクションはオフになります |
headers array | 接続ヘッダーを置き換えます |
allowed_tools array | ツールごとのスイッチを置き換えます。各エントリは {"name", "is_active"} です |
default_tool_is_active boolean | allowed_tools に載っていないツールを使用してよいかどうか |
name string | 表示名(最大 100 文字) |
description string | アクション一覧に表示される説明(最大 2500 文字) |
curl -X PATCH https://app.quickchat.ai/v1/api/ai_actions/2/remote_mcp \ -H 'Authorization: Bearer <API_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "allowed_tools": [ {"name": "search_docs", "is_active": true}, {"name": "delete_page", "is_active": false} ], "default_tool_is_active": false }'import requests
response = requests.patch( url="https://app.quickchat.ai/v1/api/ai_actions/2/remote_mcp", headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "allowed_tools": [ {"name": "search_docs", "is_active": True}, {"name": "delete_page", "is_active": False}, ], "default_tool_is_active": False, },)data = response.json()Response 200 OK — 更新された MCP アクションを、作成レスポンスと同じ形式で返します。