代理消息终端是你向代理发送代理通知消息的终端。
删除代理消息端点
使用 a365 cleanup blueprint --endpoint-only 命令清除代理消息传送终结点的注册。 这个命令不会影响你的代理代码或已部署的终端。 它仅删除注册条目。
对于 M365 代理(Teams,Copilot),通过 Teams Graph 使用 --m365 来清除终结点:
# M365 agents — clears via Teams Graph (MCP Platform)
a365 cleanup blueprint --endpoint-only --m365
# Non-M365 agents — prints the Teams Developer Portal URL for manual configuration
a365 cleanup blueprint --endpoint-only
在 a365.config.json 中配置消息端点
在设置消息端点之前,请在配置文件 a365.config.json 中指定它。 该文件包含您的代理部署的核心配置。
添加或更新这些消息端点配置属性:
{
"messagingEndpoint": "https://your-endpoint-url.com/api/messages",
"deploymentProjectPath": "."
}
messagingEndpoint指定可以向代理发送消息的具体端点URL。deploymentProjectPath:代理项目目录的路径。 如果代理已部署且不需要更新环境配置,则此属性不相关。 只有当代理代码不在你的机器上时才会设置为deploymentProjectPath.。
配置属性
| 财产 | Description | 必选 | Default | Example |
|---|---|---|---|---|
messagingEndpoint |
你的代理接收消息的网址 | Yes | 没有 | https://your-app.azurewebsites.net/api/messages |
deploymentProjectPath |
用于配置更新的代理项目目录路径 | No | . |
./my-agent 或 . |
端点配置选项
messagingEndpoint价值取决于你的部署场景:
对于 Azure 部署:
- Azure Web 应用:
https://your-app-name.azurewebsites.net/api/messages
对于非 Azure 部署:
- AWS:
https://your-api-gateway-url.amazonaws.com/api/messages - GCP:
https://your-cloud-run-url.run.app/api/messages - 其他云服务提供商:您的自定义端点网址
对于使用Dev Tunnels进行本地测试:
- 开发者隧道网址:
https://abc123xyz.devtunnels.ms:3978/api/messages
重要
它 deploymentProjectPath 指定了 CLI 在哪里查找项目文件,以及在哪里更新环境配置(如 .env 文件)。
注意
在使用开发隧道进行本地测试时,请在运行安装命令之前,用您的开发隧道 URL 更新 messagingEndpoint 中的 a365.config.json。 关于更多信息,请参见 Dev Tunnels 测试。
设置代理消息端点
更新 a365.config.json 文件后,使用此命令注册消息终结点,以便代理 365 服务可以向代理发送通知。
对于 M365 代理(Teams,Copilot),请将 --m365 传递给 Teams Graph 以进行注册:
# M365 agents — registers via Teams Graph (MCP Platform)
a365 setup blueprint --endpoint-only --m365
# Non-M365 agents — prints the Teams Developer Portal URL for manual configuration
a365 setup blueprint --endpoint-only
在本地测试期间,你可以先将该端点设置为开发隧道端点,然后再部署到云端。 关于更多信息,请参见 Dev Tunnels 测试。
要更新现有的终结点 URL,请执行以下步骤:
a365 setup blueprint --update-endpoint https://your-new-host.example.com/api/messages --m365
终端部署
如果尚未将代理部署到云,了解如何将代理部署到 Azure。
如果你已经部署了代理到云端,可以像之前展示的那样设置消息端点。
了解如何在其他一些流行的云上设置消息端点:
- Amazon Web Services
- Google 云平台