跳到主内容
@wquguru
精选88Microsoft Foundry 博客(RSS)技巧与观点

微软Foundry企业多Agent系统生产环境设计与安全实践

Global enterprise multi-agent systems in production: Design and security (Part 1)

原文
发到 X
推荐理由

面向Agent开发者的硬核工程指南,给出了从架构选型到安全控制的完整清单,直接指导生产落地。

The work behind this series began with customers while hosted agents in Microsoft Foundry were still in private preview. Customers adopted the service because it took the platform work off their plates: running, scaling, open ecosystem and versioning agents, each with its own identity and built-in observability. Since then, that work has taken multiple enterprise multi-agent systems to production across many geographies.

本系列工作始于客户,当时 Microsoft Foundry 中的托管代理仍处于私有预览阶段。客户采用该服务是因为它减轻了平台工作的负担:运行、扩展、开放生态系统和版本控制代理,每个代理都有独立的身份和内置的可观测性。此后,这项工作已将多个企业级多代理系统部署到许多地区的生产环境中。

Those customers weren't all at the same stage. Many were just starting with large language model (LLM) features and had concerns about quality assurance, so some of that work started before any code. For one customer with a business-to-business (B2B) product, the first step was helping their executives understand how an LLM feature would affect the product and the clients who use it. A white paper, presented and circulated to the product manager and leadership to address their concerns, set out a blueprint for LLM evaluation and assurance with global considerations. It covered the main risk areas, from hallucination and harmful output to privacy, prompt injection, reliability, and global regulation, and how to evaluate and mitigate each one.

这些客户所处的阶段并不相同。许多人刚开始使用大语言模型(LLM)功能,并对质量保证存在担忧,因此部分工作在编写任何代码之前就已开始。对于一家拥有面向企业(B2B)产品的客户,第一步是帮助其高管理解 LLM 功能将如何影响产品及其使用的客户。一份白皮书向产品经理和领导层展示并分发,以解决他们的担忧,概述了具有全球考量的 LLM 评估与保证蓝图。它涵盖了主要风险领域,从幻觉和有害输出到隐私、提示注入、可靠性和全球监管,以及如何评估和缓解每一项风险。

One lesson from that work came early: a convincing response is where the engineering starts, not where it ends. Dependable systems make identity, state, recovery, and control boundaries explicit, and they prove each one holds. This post shares seven design and security practices from that work, each with a release check you can apply to your own system.

这项工作中的一个教训来得很早:令人信服的响应是工程的起点,而非终点。可靠的系统使身份、状态、恢复和控制边界明确化,并证明每一处边界都稳固有效。本文分享了来自这项工作的七项设计和安全实践,每项实践都附有发布检查清单,您可将其应用于自己的系统。

What hosted agents handle, and what you own

托管代理处理的内容与您需要负责的内容

Hosted agents in Microsoft Foundry let you keep the agent framework you already use. The basic flow has four steps:

Microsoft Foundry 中的托管代理让您能够保留已使用的代理框架。基本流程包含四个步骤:

  • Build the agent with Microsoft Agent Framework, LangGraph, or your custom Python or C# code.
  • Run and test it locally.
  • Deploy it with the Azure Developer CLI (azd), which packages it as a container image for Foundry Agent Service. The Microsoft Agent Framework hosting guide walks through steps 2 and 3.
  • Call its endpoint from your application, or publish it to Microsoft Teams and Microsoft 365.
  • 使用 Microsoft Agent Framework、LangGraph 或自定义 Python 或 C# 代码构建代理。
  • 在本地运行和测试。
  • 使用 Azure Developer CLI (azd) 进行部署,它将代理打包为 Foundry Agent Service 的容器镜像。Microsoft Agent Framework 托管指南详细介绍了第 2 和第 3 步。
  • 从您的应用程序调用其端点,或将其发布到 Microsoft Teams 和 Microsoft 365。

Foundry runs the agent on Microsoft-managed infrastructure and supplies what teams would otherwise build themselves: a dedicated Microsoft Entra agent identity and endpoint, isolated per-session sandboxes that scale to zero and resume with their files, immutable versions, Foundry tools through a Toolbox endpoint, and private networking. Agents built on the hosting protocol libraries emit OpenTelemetry traces to Application Insights by default, so tracing works from the first deployment. Part 2 shows how the Microsoft Foundry evaluation and improvement tools build on those traces.

Foundry 在由 Microsoft 管理的基础设施上运行代理,并提供了团队原本需要自行构建的内容:专用的 Microsoft Entra 代理身份和端点、按会话隔离的沙箱(可缩容至零并在恢复时保留文件)、不可变版本、通过 Toolbox 端点提供的 Foundry 工具以及私有网络。基于托管协议库构建的代理默认会向 Application Insights 发送 OpenTelemetry 跟踪数据,因此从首次部署起即可实现跟踪功能。第 2 部分展示了 Microsoft Foundry 评估和改进工具如何基于这些跟踪数据构建。

Managed hosting changes where the code runs, not who owns the outcome. You still own application authorization, business effects, data handling, and evidence that the whole system behaves correctly. You don't need every practice in this series on day one. A single agent for one team in one region can start with the four steps above and add practices as you add agents, users, sensitive data, and geographies.

托管式托管改变的是代码的运行位置,而非结果的所有权。你仍然拥有应用授权、业务影响、数据处理以及证明整个系统正确运行的证据。你不需要在第一天就采用本系列中的所有最佳实践。一个区域中一个团队的单个代理可以从上述四个步骤开始,随着代理、用户、敏感数据和地理区域的增加,逐步添加其他最佳实践。

Feature availability: At the time of writing, several features in this series are in preview: the state store, resilient long-running execution, network egress controls, the tool call and tool response intervention points, spotlighting, Task Adherence, document-level access features in Azure AI Search, Microsoft Defender protection for Foundry agents, and Insights in Foundry. Hosted-agent optimization requires an allow-listed subscription. Preview features have no service-level agreement and aren't recommended for production workloads; generally available (GA) features are supported for production use. Check each feature's current status in its documentation before you rely on it.

功能可用性:截至撰写本文时,本系列中的几项功能仍处于预览阶段:状态存储、弹性长运行执行、网络出口控制、工具调用和工具响应干预点、高亮显示、任务遵循、Azure AI Search 中的文档级访问功能、Microsoft Defender for Foundry agents 保护以及 Foundry Insights。托管代理优化需要订阅列入白名单。预览功能没有服务等级协议(SLA),不建议用于生产工作负载;一般可用(GA)功能支持用于生产环境。在使用某项功能之前,请查阅其文档以了解当前状态。

The example behind these lessons

这些经验教训背后的示例

Across the implementations behind this series, adoption kept growing as teams applied hosted agents to more of the documented scenarios. A generalized example from those implementations runs through the series: an enterprise assistant that answers domain questions for business users. An orchestrator agent checks whether each request is in scope and delegates it to specialist agents. Those agents query governed enterprise data through tools, run sandboxed code, and draw on confidential internal knowledge that may inform an answer but must not be exposed directly. Long-running jobs outlast a single response, and users expect conversation history, visible progress, and cancellation that stops the work itself.

在本系列所涵盖的实施过程中,随着团队将托管代理应用于更多已记录的场景,采用率持续增长。贯穿整个系列的一个通用示例来自这些实施案例:一个为企业用户提供领域问题解答的企业助手。编排代理检查每个请求是否在范围内,并将其委派给专业代理。这些代理通过工具查询受治理的企业数据,运行沙箱化代码,并利用可能影响答案但不得直接暴露的机密内部知识。长运行作业的执行时间超过单次响应,用户期望具备对话历史、可见进度以及能够停止工作本身的取消功能。

Figure 1. A generalized example drawn from these implementations, with the controls the lessons recommend.

图 1. 从这些实现中抽取的一个通用示例,其中包含了课程所推荐的控件。

Organization-specific details are generalized throughout. Each lesson takes one boundary in this example and turns it into a contract you can test before release.

组织特定的细节在整个过程中被泛化。本示例中的每个课程将一个边界转化为一个可在发布前进行测试的契约。

What changes across geographies

跨地理区域的差异

  • Each region is its own deployment. Give each one its own identity, quota, network, configuration, telemetry, and recovery evidence, and coordinate releases and recovery across them.
  • Features and quotas differ by region. Verify feature availability and quotas region by region; deployments aren't interchangeable by default.
  • Data residency is a design decision. Decide where business records, retrieved content, and diagnostic copies may be processed and stored. Multiple regions and managed hosting alone establish neither residency nor failover, so design and demonstrate both.
  • 每个区域都是独立的部署。为每个区域赋予其自身的身份、配额、网络、配置、遥测数据和恢复证据,并协调它们之间的发布和恢复。
  • 功能和因区域而异。按区域逐一验证功能可用性和配额;默认情况下,部署不可互换。
  • 数据驻留是一项设计决策。确定业务记录、检索到的内容和诊断副本可以在何处处理和存储。多个区域和管理式托管本身并不能确立数据驻留或故障转移,因此需要设计和证明这两者。

What you will learn

你将学到的内容

LessonWhy it matters
1. Choose ownership and architectureOrchestrator and specialist agents need bounded, owned work.
2. Follow the identity chainEvery user, tool, and delegated call carries its own authority.
3. Define state contractsHistory, files, metadata, and checkpoints have different lifecycles.
4. Make recovery and actions explicitLong-running work and cancellation must survive failure.
5. Check networking and capacityIsolated deployments multiply regions, networks, and quotas.
6. Own knowledge and authorizationInternal knowledge may inform answers but must not leak.
7. Verify control coverageEvery path needs an enforced control and tested evidence.
课程重要性
1. 选择所有权和架构编排器和专家代理需要有界且拥有明确归属的工作。
2. 遵循身份链每个用户、工具和委托调用都携带其自身的权限。
3. 定义状态契约历史记录、文件、元数据和检查点具有不同的生命周期。
4. 使恢复和操作显式化长时间运行的工作和取消操作必须能够承受故障。
5. 检查网络和容量隔离部署会成倍增加区域、网络和配额的数量。
6. 掌握知识和授权内部知识可能会影响回答,但绝不能泄露。
7. 验证控制覆盖范围每条路径都需要有强制执行的控件和经过测试的证据。

Next in this series: release and operations (Part 2), which closes with the improvement loop.

本系列的下一篇:发布与运维(第 2 部分),最后以改进循环收尾。

1. Start with ownership and the smallest sufficient architecture

1. 从所有权和最简充分架构开始

Choose the simplest architecture that does the job, and give every part of it an owner. Azure Architecture Center guidance on artificial intelligence (AI) agent orchestration patterns favors the simplest sufficient option: a direct model call, one tool-enabled agent, or multiple agents. Each step up adds handoffs, model calls, distributed state, and failure combinations, so add an agent only when a simpler design can't do the job. Then give application ingress, orchestration, models, tools, knowledge ingestion, stores, and operational response each an owner and a failure contract. State and diagnostic data need their own ownership, access, retention, and deletion rules.

选择能完成任务的最简单架构,并为其中的每个部分指定负责人。Azure Architecture Center 关于人工智能 (AI) 代理编排模式的指南倾向于最简充分方案:直接模型调用、单个启用工具的代理或多个代理。每增加一层都会引入交接、模型调用、分布式状态和故障组合,因此只有在更简单的设计无法完成任务时才添加代理。然后,为应用入口、编排、模型、工具、知识摄取、存储库和操作响应分别指定负责人和故障契约。状态数据和诊断数据也需要各自的所有权、访问、保留和删除规则。

Figure 2. Ownership boundaries for a hosted-agent action. A generalized pattern, not a specific customer's architecture.

图 2. 托管代理操作的归属边界。这是一种通用模式,而非特定客户的架构。

Match the orchestration pattern to the work:

将编排模式与工作匹配:

PatternUseful whenTradeoff
SequentialOrdered prerequisites.Accumulating latency; early errors propagate.
ConcurrentIndependent subtasks.Capacity spikes; conflicting results need aggregation.
HandoffA specialist emerges during interaction.Explicit ownership, loop prevention, and escalation.
Discussion or iterative planningCritique improves the outcome.Less predictable completion, tokens, and cost.
模式适用场景权衡
顺序执行存在有序的前置依赖。延迟累积;早期错误会传播。
并发执行子任务相互独立。容量激增;冲突的结果需要聚合。
交接交互过程中出现专家角色。明确的归属权、防止循环以及升级处理。
讨论或迭代规划批判性反馈能改善结果。完成时间、Token 消耗和成本的可预测性降低。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件