コンパニオン エージェントは、リアルタイムの会話中にガイダンスを提供し、人間のエージェントが複数のステップを伴う複雑なタスクを処理できるようにします。マルチステップ ワークフロー機能は、必須ステップを追跡し、コンテキスト タスクの詳細を提供することで、エージェントの生産性を高め、オンザジョブ トレーニングを迅速化し、一貫したサービス品質とコンプライアンスを維持します。この機能は、会話の進行状況に基づいて適切なステップを自動的に検出します。
主な機能
コンパニオン エージェントのマルチステップ ワークフロー機能には、次のようなメリットがあります。
- 標準化されたプロセス: すべてのエージェントがまったく同じ手順に沿って対応できるようになり、コンプライアンス エラーを減らし、トレーニング時間を短縮できます。
- 詳細を抽出: 注文番号、日付、好みなど、顧客のメッセージから重要な詳細情報を自動的に取得します。
- ツールの自動開始: 会話中にシステムツールを自動的に実行するか、重要なタスクを完了する前に人間のエージェントの承認を待ちます。
- Human-in-the-loop: 人間のエージェントが各ステップを制御します。ワークフローの開始や終了、保存された情報の編集、タスクの完了マーク付け、前のステップへの戻りなどを行うことができます。
仕組み
人間のエージェントが会話を開始し、トピックが特定のワークフローと一致すると、コンパニオン エージェントがマルチステップ ワークフローを開始します。マルチステップ ワークフローでは、タイトルと手順を含む上位 3 つのワークフロー カードが表示されます。たとえば、お客様から技術者の予約についてお問い合わせを受けた場合、上位 3 つのワークフロー カードは次のようになります。
- 予約に関するお問い合わせ
- 予約のキャンセル
- 予約スケジュール
予約に関するお問い合わせの手順には、次のような手順が含まれます。
- お客様を検証する
- 予約情報を取得する
- 予約の詳細を確認する
マルチステップ ワークフローはプロアクティブ モードで動作します。コンパニオン エージェントは、各顧客メッセージを読み取り、関連性の高いワークフローを最大 3 つ提案します。人間のエージェントがワークフローを開始すると、ガイダンス モードはステップの完了を追跡し、アクティブなステップに対する返信と次のアクションの候補を生成します。
ワークフローの手順
ワークフローは、次の 5 つのコアステップで構成されます。
- お客様に伝える: 人間のエージェントがお客様と共有する手順と推奨される回答が表示されます。
- 情報を収集する: 人間のエージェントがお客様から収集する必要がある具体的な詳細情報を定義します。
- 手動アクション: 外部ツールまたはデスクトップ アプリケーションでアクションを実行し、出力変数を記録するよう、人間のエージェントに指示します。
- ツール呼び出し: コンパニオン エージェントが自動システムツールを起動し、レスポンスの詳細をワークフロー変数に保存します。
- ワークフローを終了: ワークフロー ブランチの完了をマークします。
ワークフローの例
次の破損した商品の返品と交換の例では、完全な分岐ワークフローを作成し、アクティブな公開版として公開して、コンパニオン エージェントに添付する方法を示します。
ステップ 1: ワークフローを作成する
次の JSON オブジェクトは、ワークフローの下書きの完全な構造を定義します。
POST /v2beta1/projects/my-project/locations/global/companionAgentWorkflows
{
"displayName": "Damaged Item Return and Replacement",
"description": "Use this workflow when a customer reports receiving a damaged, broken, or defective item and requests a replacement or refund.",
"rootStepId": "step_1_collect_details",
"steps": [
{
"id": "step_1_collect_details",
"title": "Collect Order ID and Resolution Preference",
"type": "INFORMATION_COLLECTION",
"actions": [
{
"humanAgentAction": {
"informationCollectionAction": {
"displayDetails": {
"content": "Ask the customer for their **Order ID** and whether they prefer a **Replacement** or a **Refund**.",
"enableMarkdown": true
},
"messageSuggestionConfig": {
"content": "Ask the customer for their order number and whether they would like a free replacement or a full refund.",
"verbatim": false
},
"variables": [
{
"name": "order_id",
"description": "The customer's alphanumeric order identifier (for example, ORD-5510).",
"stringType": {}
},
{
"name": "resolution_preference",
"description": "Whether the customer wants a replacement unit or a refund.",
"enumType": {
"values": ["REPLACEMENT", "REFUND"]
}
}
]
}
}
}
],
"transitions": [
{
"targetStepId": "step_2_check_eligibility"
}
]
},
{
"id": "step_2_check_eligibility",
"title": "Verify Order Return Eligibility",
"type": "SYSTEM_ACTION",
"actions": [
{
"systemAction": {
"cesToolSpec": {
"cesTool": "projects/my-project/locations/global/apps/order-app/tools/lookup-order",
"confirmationRequirement": "NOT_REQUIRED"
},
"outputVariableMappings": [
{
"variable": {
"name": "order_eligible",
"description": "Whether the order is within the 30-day return window.",
"booleanType": {}
},
"fieldPaths": [
{"path": "order.returnEligible"},
{"path": "data.isEligible"}
]
}
]
}
}
],
"transitions": [
{
"targetStepId": "step_3a_log_replacement",
"condition": {
"variableCondition": "order_eligible == true && resolution_preference == 'REPLACEMENT'"
}
},
{
"targetStepId": "step_3b_refund_disclosure",
"condition": {
"variableCondition": "order_eligible == true && resolution_preference == 'REFUND'"
}
},
{
"targetStepId": "step_3c_explain_ineligible"
}
]
},
{
"id": "step_3a_log_replacement",
"title": "Create Replacement Shipment in Warehouse Portal",
"type": "MANUAL_ACTION",
"actions": [
{
"humanAgentAction": {
"manualExternalSystemAction": {
"displayDetails": {
"content": "Open the **Warehouse Portal**, select **Expedited Replacement**, and enter the new tracking number below.",
"enableMarkdown": true
},
"variables": [
{
"name": "replacement_tracking_id",
"description": "The tracking number generated in the Warehouse Portal.",
"stringType": {}
}
]
}
}
}
],
"transitions": [
{
"targetStepId": "step_4_end"
}
]
},
{
"id": "step_3b_refund_disclosure",
"title": "Read Mandatory Refund Disclosure",
"type": "INFORMATIONAL_MESSAGE",
"actions": [
{
"humanAgentAction": {
"informationalResponseAction": {
"displayDetails": {
"content": "Read the required refund policy disclosure verbatim to the customer.",
"enableMarkdown": false
},
"messageSuggestionConfig": {
"content": "Your full refund has been approved. Please note that refunds take 3 to 5 business days to post to your original payment method, and the damaged item must be dropped off using the prepaid return label within 14 calendar days.",
"verbatim": true
}
}
}
}
],
"transitions": [
{
"targetStepId": "step_4_end"
}
]
},
{
"id": "step_3c_explain_ineligible",
"title": "Explain Return Window Expiration",
"type": "INFORMATIONAL_MESSAGE",
"actions": [
{
"humanAgentAction": {
"informationalResponseAction": {
"messageSuggestionConfig": {
"content": "Politely inform the customer that the 30-day return window has expired and offer a 15% courtesy discount toward a replacement.",
"verbatim": false
}
}
}
}
],
"transitions": [
{
"targetStepId": "step_4_end"
}
]
},
{
"id": "step_4_end",
"title": "Complete Workflow",
"type": "END_WORKFLOW"
}
]
}
ステップ 2: 公開サイトに公開してプロモーションする
次の例のように、下書きワークフローを公開してステータスをライブに設定するリクエストを送信します。
POST /v2beta1/projects/my-project/locations/global/companionAgentWorkflows/damaged-item-return:publish
{
"markLive": true
}
ステップ 3: ワークフローをコンパニオン エージェントに関連付ける
次の JSON オブジェクトは、ワークフローを関連付けるためのコンパニオン エージェントの構成とトリガー設定を指定します。
PATCH /v2beta1/projects/my-project/locations/global/companionAgents/my-companion-agent?updateMask=companionAgentWorkflowSpecs,skillConfigs
{
"companionAgentWorkflowSpecs": [
{
"workflow": "projects/my-project/locations/global/companionAgentWorkflows/damaged-item-return",
"proactiveEnabled": true
}
],
"skillConfigs": [
{
"skillTriggeringEvent": "END_OF_UTTERANCE",
"guidanceSkillConfig": {}
}
]
}