Agent 365 疑難排解指南

使用本指南診斷並解決整個 Agent 365 開發生命週期中的問題。 將本文做為疑難排解的起點,再前往特定章節查看詳細解決方案。

疑難排解步驟

此表格中的每個連結,都提供特定領域的疑難排解步驟。 內容依 Agent 365 SDK 開發生命週期的階段分組。

階段 疑難排解內容
建置並執行 Agent Agent 365 CLI
Agent 365 CLI 的自訂用戶端應用程式註冊
模擬工具伺服器
Agent 可觀察性
測試 Agent
使用 Dev Tunnels 測試 Agent
新增並管理工具
設定 Agent 藍圖 設定 Agent 藍圖
部署 將 Agent 部署到 Azure
將 Agent 部署到 Amazon Web Services (AWS)
將 Agent 部署到 Google Cloud Platform (GCP)
將 Agent 發佈至 Microsoft 365 系統管理中心 將 Agent 發佈至 Microsoft 系統管理中心
建立 Agent 執行個體 建立 Agent 執行個體

診斷命令參考

在深入探討特定問題之前,請使用下列命令檢查您 Agent 365 設定的目前狀態:

檢查 CLI 與設定

使用下列命令驗證您的 CLI 與設定。

# Verify CLI is installed and check version
a365 --version

# Display current configuration
Get-Content a365.config.json | ConvertFrom-Json

# Display generated configuration (after setup)
Get-Content a365.generated.config.json | ConvertFrom-Json

驗證 Azure 資源

使用下列命令檢查 Azure 資源與應用程式狀態。

# Set these variables with appropriate data for your app
$resource-group = <your-resource-group>
$app-name = <your-app-name>

# Authenticate with Azure
az login

# List resources in your resource group
az resource list --resource-group $resource-group --output table

# Check Web App status
az webapp show --name $app-name --resource-group $resource-group --query state

# View Web App logs (real-time)
az webapp log tail --name $app-name --resource-group $resource-group

驗證 Agent 藍圖

確認您的 Agent 藍圖存在,且設定正確。

# Check if blueprint ID is set
Get-Content a365.generated.config.json | Select-String "agentBlueprintId"

在 Microsoft Entra 中驗證藍圖

  1. 前往 https://entra.microsoft.com>應用程式註冊>所有應用程式
  2. 搜尋您的 agentBlueprintId

預防性最佳做法

使用下列建議,以預防常見問題並簡化疑難排解流程。

開始之前

必要條件檢查清單:

✅ 已安裝 .NET 8.0 SDK
✅ 已安裝並驗證 Azure CLI
✅ 已指派必要的 Entra 權限
✅ 已建立並設定自訂用戶端應用程式
✅ 租用戶已啟用 Microsoft Agent 365 Frontier

驗證命令:

# Check .NET
dotnet --version

# Check Azure CLI
az --version
az account show

# Check CLI installation
a365 --version

開發期間

儲存您的設定:

  • 備份您的設定檔。
  • 記錄您的設定選擇。
  • 儲存產生的識別碼,例如藍圖識別碼與受控識別識別碼。

保持 CLI 更新:

dotnet tool update --global Microsoft.Agents.A365.DevTools.Cli

逐步測試:

  • 每個主要步驟完成後都要測試。
  • 確認成功後再繼續進行下一步。
  • 保留可正常運作的設定。

部署之前

部署前檢查清單:

✅ Agent 已在 Agents Playground 中於本機正常運作。
✅ 已記錄所有環境變數。
✅ 已將設定檔提交至原始檔控制。
✅ 已設定並測試 MCP 伺服器。
✅ 已啟用並驗證可觀察性。

取得其他說明

若要檢閱範例程式碼、回報問題或搜尋現有問題,請使用下列存放庫: