官方更新 GitHub Changelog Thu, 01 Oct 2026 正文 ok 570 words

Copilot CLI 与 Copilot 应用推出动态工作流

英文标题:Dynamic workflows in Copilot CLI and the Copilot app

GitHub 宣布在 Copilot CLI、GitHub Copilot 应用和 GitHub Copilot SDK 中推出动态工作流(Dynamic workflows)。该功能允许开发者以代码定义多 Agent 编排流程,将自动化步骤、并行任务、结构化结果传递、人工审核和断点恢复结合起来,从而提高复杂任务的可靠性与可观测性。动态工作流适用于故障排查、发布检查、并行 PR 审查、大型代码库扫描及长时间运行任务等场景。该功能现已向所有 Copilot 套餐开放公共预览,Copilot CLI 用户需启用实验性功能。
打开原文相关 2 · 机会 4
media12.2 KB media26.4 KB

中文

动态工作流现已在 Copilot CLI、GitHub Copilot 应用和 GitHub Copilot SDK 中可用。它让你能够通过代码定义编排流程,从而获得复杂多 Agent 工作所需的可靠性与可观测性。

动态工作流是一个定义任务执行方式的程序。它将自动化步骤与一个或多个 Agent 的工作结合起来,这些步骤可以依次执行、并行执行,或同时采用两种方式。步骤内容、何时调用 Agent,以及如何使用其结果,均由代码定义;而 Agent 则负责需要分析或判断的部分。该程序本身位于 GitHub Copilot 扩展中,因此能够访问 Copilot 强大的可扩展性 API。

例如,你可以使用动态工作流调查一次服务事故:收集日志和遥测数据,分配独立 Agent 分析不同系统,并将其结构化发现汇总为时间线和根因报告。每次都会执行相同的步骤。

动态工作流可以:

  • 运行命令、使用工具或调用其他服务。
  • 将一个目标拆分为多个任务,并并行运行相互独立的任务。
  • 将结构化结果从一个阶段传递到下一个阶段。
  • 让子 Agent 相互验证彼此的发现。
  • 如果你的客户端支持,则向你请求输入。
  • 在检查点暂停,以便你审查结果,并在准备就绪后恢复执行。

与 /fleet 不同,后者由 Copilot 将工作委派给子 Agent 并并行协调其工作;动态工作流则执行由代码定义的流程。请参阅动态工作流文档了解更多信息。

你可以自行编写动态工作流,也可以让 Copilot 为你编写。与扩展类似,Copilot 提供内置创作指导,你可以借此了解动态工作流的工作方式,或让 Copilot 完整地为你编写一个工作流。

当你希望定义一个可复用的流程,或当单项任务需要明确的阶段、检查或限制时,可以使用动态工作流。适合的候选场景包括:

  • 运行发布检查,让一个 Agent 评估失败情况,并暂停以供你审查发现结果后再继续执行。
  • 并行审查拉取请求中大量发生变更的文件。
  • 使用代码查找已合并拉取请求中尚未解决的审查评论,然后询问两个模型这些评论是否仍然重要。仅当两个模型都达成一致时,工作流代码才会报告发现结果。
  • 同时扫描大型代码库中的多个目录,以查找某种模式,例如缺失的测试,或正在移除的 API 的使用位置。
  • 研究一项变更,根据研究结果规划实施方式,然后完成该变更。
  • 启动一次耗时较长、可能成本较高,且你可能希望稍后暂停并恢复的运行。

如果只是需要快速回答或进行简单修改,标准聊天模式中的普通提示通常已经足够。

动态工作流适用于所有 Copilot 套餐。

入门方式:

  • 在 GitHub Copilot 应用中,动态工作流始终可用,无需任何设置。
  • 在最新版 Copilot CLI 中,可通过在运行 CLI 时添加 --experimental 命令行选项,或在交互式会话中使用 /experimental on,来启用实验性功能。要更新 Copilot CLI,请运行 /update。
  • 请 Copilot 为你经常运行的流程创建一个工作流。有关分步说明,请参阅创建动态工作流。
  • 询问“有哪些动态工作流可用?”以查看你已拥有的工作流。

请在 Copilot CLI 中通过 /feedback 分享反馈。

动态工作流目前处于公共预览阶段,功能可能发生变化。

欢迎在 GitHub Community 中参与讨论。

English / 原文

Dynamic workflows are now available in Copilot CLI, the GitHub Copilot app, and the GitHub Copilot SDK. These let you define an orchestration in code to get the reliability and observability that complex, multi-agent work demands.

A dynamic workflow is a program that defines how a task is carried out. It combines automated steps with the work of one or more agents, and those steps can run one after another, in parallel, or both. The steps, when to involve agents, and how to use their results are all defined in code, while agents handle the parts that need analysis or judgment. The program itself lives inside a GitHub Copilot extension, which means it has access to Copilot’s powerful extensibility APIs.

For example, you could use a dynamic workflow to investigate a service incident: collect logs and telemetry, assign independent agents to analyze different systems, and combine their structured findings into a timeline and root-cause report. The same steps run every time.

Dynamic workflows can:

  • Run commands, use tools, or call other services.
  • Divide a goal into tasks and run independent tasks in parallel.
  • Pass structured results from one stage to the next.
  • Have subagents verify each other’s findings.
  • Ask you for input, if your client supports it.
  • Pause at a checkpoint so you can review results and resume when you’re ready.

Unlike /fleet, where Copilot delegates work to subagents and coordinates their work in parallel, a dynamic workflow carries out a process defined in code. Learn more in our docs about dynamic workflows.

You can author dynamic workflows yourself or have Copilot write them for you. Just like with extensions, Copilot includes built-in authoring guidance you can use to learn how dynamic workflows work or to have Copilot write one entirely for you.

Use a dynamic workflow when you want to define a process you can reuse, or when a single task needs clear stages, checks, or limits. Good candidates include:

  • Running release checks, asking one agent to assess failures, and pausing for you to review the findings before resuming.
  • Reviewing many changed files in a pull request in parallel.
  • Using code to find unresolved review comments on merged pull requests, then asking two models whether the comments still matter. The workflow’s code only reports findings when both agree.
  • Sweeping a large codebase for a pattern (e.g., missing tests or usages of an API you’re removing) across many directories at once.
  • Researching a change, planning its implementation from the findings, and then making the change.
  • Kicking off a long, potentially expensive run that you may want to pause and resume later.

For a quick answer or a simple change, a normal prompt in the standard chat mode is usually sufficient.

Dynamic workflows are available on all Copilot plans.

To get started:

  • In the GitHub Copilot app, dynamic workflows are always available with no setup required.
  • In the latest version of Copilot CLI, enable experimental features by running the CLI with the --experimental command-line option or by using /experimental on in an interactive session. To update Copilot CLI, run /update.
  • Ask Copilot to create a workflow for a process you run often. For step-by-step instructions, see Creating a dynamic workflow.
  • Ask “What dynamic workflows are available?” to see the ones you already have.

Share feedback with /feedback in Copilot CLI.

Dynamic workflows are in public preview and subject to change.

Join the discussion within GitHub Community.