Code Velocity
开发者工具

AI执行:软件领域'文本即AI'时代的终结

·7 分钟阅读·GitHub·原始来源
分享
GitHub Copilot SDK标志,代表软件开发中的AI执行和代理工作流

title: "AI执行:软件领域'文本即AI'时代的终结" slug: "the-era-of-ai-as-text-is-over-execution-is-the-new-interface" date: "2026-03-12" lang: "zh" source: "https://github.blog/ai-and-ml/github-copilot/the-era-of-ai-as-text-is-over-execution-is-the-new-interface/" category: "开发者工具" keywords:

  • AI执行
  • GitHub Copilot SDK
  • 代理工作流
  • 可编程AI
  • 开发者工具
  • AI即基础设施
  • 模型上下文协议
  • 软件开发
  • AI编排
  • 自适应软件
  • 多步任务
  • 嵌入式AI meta_description: "探索GitHub Copilot SDK如何标志着'文本即AI'时代的结束,它将强大的AI执行和代理工作流直接整合到应用程序中,成为软件开发新的可编程接口。" image: "/images/articles/the-era-of-ai-as-text-is-over-execution-is-the-new-interface.png" image_alt: "GitHub Copilot SDK标志,代表软件开发中的AI执行和代理工作流" quality_score: 94 content_score: 93 seo_score: 95 companies:
  • GitHub schema_type: "NewsArticle" reading_time: 7 faq:
  • question: "GitHub Copilot SDK引入的'文本即AI'到'AI即执行'的核心转变是什么?" answer: "这一根本性转变意味着AI系统不再仅仅从文本输入生成文本输出,需要人工干预后续步骤,而是转向AI能够在预定义约束集内主动规划、执行、适应并从错误中恢复的系统。这意味着AI从被动助手转变为积极参与者,能够直接在软件应用程序中编排复杂的、多步骤的操作,使其成为一个功能组件,而不仅仅是一个对话界面。Copilot SDK提供了将此执行层嵌入到任何应用程序中的工具。"
  • question: "GitHub Copilot SDK如何在应用程序中实现复杂的代理工作流?" answer: "GitHub Copilot SDK通过提供与驱动GitHub Copilot CLI相同的经过生产验证的规划和执行引擎,从而增强了应用程序的功能。开发者无需从头构建复杂的编排堆栈,而是可以嵌入此SDK,将意图委派给AI代理。这些代理可以探索仓库、规划必要步骤、修改文件、运行命令并适应意外问题——所有这些都在尊重既定边界的前提下进行。这使得软件变得更具适应性和弹性,从僵化、脚本化的工作流转向动态、上下文感知的操作。"
  • question: "模型上下文协议(MCP)是什么?它对扎根式AI执行为何至关重要?" answer: "模型上下文协议(MCP)是一个关键组件,它为AI代理提供了结构化和可组合的上下文。MCP允许应用程序定义特定领域工具和代理技能,而不是将关键系统逻辑和数据嵌入到提示中(这种做法会导致脆弱、难以测试的工作流)。然后,执行引擎使用MCP在运行时直接检索相关上下文,例如服务所有权数据、API架构或依赖规则。这确保了AI代理在真实、经过授权的数据和系统上运行,避免了猜测,并使AI工作流更加可靠和可维护。"
  • question: "除了集成开发环境(IDE)之外,GitHub Copilot SDK还可以在哪些地方嵌入AI执行?" answer: "GitHub Copilot SDK将AI执行从主要局限于IDE中解放出来,使其能够作为一种普遍存在的应用层能力。这意味着代理能力可以无缝集成到各种环境中,包括桌面应用程序、内部操作工具、后台服务、SaaS平台和事件驱动系统。通过允许应用程序在特定事件(如文件更改、部署触发器或用户操作)发生时以编程方式调用Copilot,SDK将AI从侧边窗口中的一个辅助工具转变为无论软件在哪里运行都能操作的核心基础设施。"
  • question: "使用Copilot SDK将多步任务委派给AI代理的主要好处是什么?" answer: "通过Copilot SDK将多步任务委派给AI代理,相比传统脚本提供了显著优势。它允许软件处理那些依赖上下文、在运行中动态变化或需要强大错误恢复的工作流,而这些工作流通常会使固定脚本崩溃。通过委派“意图”而非明确的步骤,代理可以在定义的约束内自主探索、规划、执行和适应。这带来了更具可扩展性、适应性和可观测性的系统,使开发人员无需为复杂、不断演进的流程持续重建定制的编排层。"
  • question: "Copilot SDK如何提高AI驱动系统的可靠性和适应性?" answer: "Copilot SDK通过提供强大的执行层和集成结构化上下文来增强可靠性和适应性。其经过生产验证的规划和执行引擎确保代理能够规划复杂操作、执行命令、修改文件并从错误中恢复,从而使系统更具弹性。此外,通过利用模型上下文协议(MCP),代理可以访问实时、结构化和经过授权的上下文——例如API架构或依赖图——而不是依赖可能过时或泛化的提示信息。这种以真实数据为基础的方法确保代理做出明智决策,减少错误,并提高系统适应不断变化的条件和约束的能力。"
  • question: "GitHub Copilot SDK主要面向专业开发者吗?还是其他人也能从其功能中受益?" answer: "尽管GitHub Copilot SDK旨在通过将其代理AI能力扩展到应用程序和基础设施中来赋能专业开发者,但其益处是广泛传播的。通过使AI能够处理复杂的、多步骤的任务并直接集成到各种软件系统中,它简化了工作流,减少了手动工作,并增强了应用程序的适应性。这最终通过带来更高效、智能和健壮的软件,使最终用户和组织受益,即使直接与SDK的交互主要由开发者完成。SDK使AI成为整个软件生态系统中的一个基本基础设施组件。"

软件开发领域的人工智能正在经历一场深刻的变革。在过去两年中,与AI交互的主导范式涉及简单的交换:输入文本,接收文本输出,然后手动决定下一步行动。这个“文本即AI”的时代,尽管具有开创性,但现在正让位于一种更动态、更集成的方法。**GitHub Copilot SDK**应运而生,预示着一个新时代的到来,在这个时代中,**AI即执行**将成为新的界面。

生产级软件本质上就是执行——规划步骤、调用工具、修改文件、从错误中恢复以及适应约束。这些是复杂的、多步骤的操作,单纯的文本生成无法完全涵盖。GitHub Copilot SDK直接解决了这一空白,它将支撑GitHub Copilot CLI的强大执行层作为可编程能力,提供给*任何*软件应用程序使用。这意味着团队可以将经过生产验证的规划和执行引擎直接嵌入到他们的系统中,从而从根本上改变AI驱动应用程序的架构和运行方式。

## 从静态脚本到自适应代理工作流

传统的软件开发长期以来一直依赖脚本和“胶水代码”来自动化重复性任务。虽然对于固定序列有效,但当面临上下文细微差别、运行中途的更改或需要强大的错误恢复时,这些解决方案会迅速变得脆弱。开发人员经常发现自己需要硬编码边缘情况或构建定制的编排层,这是一项耗时且往往不可持续的工作。

GitHub Copilot SDK通过允许应用程序委派意图,而不是明确编码每一个步骤,从而将应用程序从这些限制中解放出来。想象一个应用程序需要“为发布准备这个仓库”。Copilot SDK不是使用僵化的脚本,而是使AI代理能够:

*   **探索**仓库的结构和内容。
*   **规划**必要的步骤,例如更新文档、运行测试或提升版本号。
*   **修改**所需文件。
*   **运行**系统环境中的命令。
*   如果任何步骤失败或出现新信息,能动态**适应**,同时在预定义的边界和权限内运行。

这一转变对现代软件系统至关重要。随着应用程序的扩展和环境的演变,固定工作流容易失败。由Copilot SDK驱动的代理执行,允许软件进行适应和自我纠正,在不持续承担从头重建复杂编排的负担下,保持可观测性和约束。这使得AI成为开发生命周期中一个活跃、智能的参与者,超越了基本的代码补全,实现了智能任务自动化。要深入了解这些复杂工作流如何得到保障,请探索[GitHub 代理工作流的安全架构](/zh/github-agentic-workflows)。

## 可靠AI的结构化上下文:模型上下文协议(MCP)

在“文本即AI”时代的一个常见陷阱是试图将过多的系统行为和数据推入AI提示中。尽管看似方便,但将逻辑编码在文本中使得工作流难以测试、难以推断和难以演进。随着时间的推移,这些精心设计的提示成为了适当结构化系统集成的脆弱替代品。

GitHub Copilot SDK通过结构化和可组合的上下文方法解决了这个问题,该方法利用了**模型上下文协议(MCP)**。通过MCP,开发者可以:

*   **定义**AI可以调用的特定领域工具或代理技能。
*   通过MCP**暴露**这些工具和技能。
*   **使**执行引擎能够在运行时动态检索上下文。

这意味着关键信息——例如服务所有权数据、API架构、历史决策记录、依赖图或内部API——不再需要被硬塞到提示中。相反,代理在其规划和执行阶段直接访问这些系统。例如,一个负责解决问题的内部代理可能会自动查询服务所有权、提取相关的历史数据、检查依赖图以评估影响,并参考内部API来提出解决方案,所有这些都遵循预定义的安全约束。这种方法与[OpenAI API提示工程最佳实践](/zh/best-practices-for-prompt-engineering-with-the-openai-api)中的挑战形成了鲜明对比,后者的上下文注入可能很复杂。

**重要性在于**:可靠的AI工作流建立在扎根、授权和结构化的上下文之上。MCP提供了关键的管道,确保代理执行在真实的工具和真实的数据上运行,消除了与基于文本的提示工程相关的猜测和脆弱性。

## AI即基础设施:将执行嵌入到IDE之外

从历史上看,面向开发者的许多AI工具都局限于集成开发环境(IDE)。虽然IDE对于编码而言是无价的,但现代软件生态系统远远超出了单一编辑器。团队需要在各种环境中具备代理能力:桌面应用程序、内部操作工具、后台服务、SaaS平台和事件驱动系统。

Copilot SDK打破了这些界限,使执行成为一种应用层能力。这意味着您的系统现在可以监听事件——文件更改、部署触发器、用户操作——并以编程方式调用Copilot以启动代理工作流。规划和执行循环在*您的产品内部*运行,而不是作为单独的界面或开发者工具。

| 特性         | '文本即AI'时代                       | 'AI即执行'时代 (Copilot SDK)      |
| :-------------- | :------------------------------------- | :--------------------------------------- |
| **交互方式** | 文本输入,文本输出                | 可编程执行循环             |
| **工作流**    | 手动决策,脆弱脚本       | 自适应、自我纠正的代理         |
| **上下文**     | 通常嵌入提示中(脆弱)    | 通过MCP结构化,实时检索  |
| **集成** | 孤立交换,以IDE为中心        | 可嵌入任何地方(应用程序、服务、SaaS)   |
| **开发者角色**| 提示工程,手动编排 | 定义意图、约束、工具      |
| **核心原则**| AI建议,人工执行             | AI规划并执行,人工监督    |

**重要性在于**:当AI执行直接嵌入到您的应用程序中时,它不再是一个有用的帮手,而成为基础性的基础设施。无论您的软件在哪里运行,它都可用,将AI的力量扩展到您数字运营的每一个角落,培养一个真正智能和自适应的软件环境。

## 架构转变:可编程AI与未来

从“文本即AI”到“AI即执行”的转变代表着一次重要的架构演进。它标志着一种范式,其中AI代理不再仅仅生成代码片段,而是可编程的规划和执行循环,能够在定义的约束下运行,与真实系统无缝集成,并在运行时智能地进行调整。

GitHub Copilot SDK是这一未来的关键推动者。通过将这些复杂的执行能力作为可编程层提供,它使开发团队能够专注于软件应完成的更高层次的“什么”,而不是不断重建AI编排的底层“如何”。这一转变将AI从一种新颖的工具转变为现代软件架构中不可或缺的核心组件,预示着全面更具弹性、自主性和智能的应用程序。如果您的应用程序可以触发逻辑,那么它现在可以触发代理执行,从而开创一个真正智能软件的新时代。

常见问题

What is the core shift from 'AI as text' to 'AI as execution' introduced by the GitHub Copilot SDK?
The fundamental shift signifies a move from AI systems that merely generate text output from text input, requiring manual human intervention for the next steps, to systems where AI can actively plan, execute, adapt, and recover from errors within a predefined set of constraints. This means AI transitions from a passive assistant to an active participant, capable of orchestrating complex, multi-step operations directly within software applications, making it a functional component rather than just a conversational interface. The Copilot SDK provides the tools to embed this execution layer into any application.
How does the GitHub Copilot SDK enable sophisticated agentic workflows within applications?
The GitHub Copilot SDK empowers applications by providing access to the same production-tested planning and execution engine that drives GitHub Copilot CLI. Instead of building complex orchestration stacks from scratch, developers can embed this SDK to delegate intent to AI agents. These agents can explore repositories, plan necessary steps, modify files, run commands, and adapt to unforeseen issues—all while respecting defined boundaries. This allows software to become more adaptive and resilient, moving beyond rigid, scripted workflows to dynamic, context-aware operations.
What is the Model Context Protocol (MCP) and why is it crucial for grounded AI execution?
The Model Context Protocol (MCP) is a vital component that enables structured and composable context for AI agents. Rather than embedding critical system logic and data within prompts—a practice that leads to brittle, hard-to-test workflows—MCP allows applications to define domain-specific tools and agent skills. The execution engine then uses MCP to retrieve relevant context directly at runtime, such as service ownership data, API schemas, or dependency rules. This ensures that AI agents operate on real, permissioned data and systems, preventing guesswork and making AI workflows more reliable and maintainable.
Beyond the Integrated Development Environment (IDE), where can the GitHub Copilot SDK embed AI execution?
The GitHub Copilot SDK liberates AI execution from being confined primarily to the IDE, allowing it to function as a pervasive application-layer capability. This means agentic capabilities can be seamlessly integrated into a wide array of environments, including desktop applications, internal operational tools, background services, SaaS platforms, and event-driven systems. By enabling applications to programmatically invoke Copilot upon specific events—like a file change, deployment trigger, or user action—the SDK transforms AI from a mere helper in a side window into core infrastructure that operates wherever the software runs.
What are the primary benefits of delegating multi-step tasks to AI agents using the Copilot SDK?
Delegating multi-step tasks to AI agents via the Copilot SDK offers significant advantages over traditional scripting. It allows software to handle workflows that are context-dependent, change dynamically mid-run, or require robust error recovery, which typically break down fixed scripts. By delegating 'intent' rather than explicit steps, agents can autonomously explore, plan, execute, and adapt within defined constraints. This leads to more scalable, adaptable, and observable systems, freeing developers from continually rebuilding bespoke orchestration layers for complex, evolving processes.
How does the Copilot SDK improve the reliability and adaptability of AI-powered systems?
The Copilot SDK enhances reliability and adaptability by providing a robust execution layer and integrating structured context. Its production-tested planning and execution engine ensures agents can plan complex operations, execute commands, modify files, and recover from errors, making systems more resilient. Furthermore, by utilizing the Model Context Protocol (MCP), agents access real-time, structured, and permissioned context—like API schemas or dependency graphs—rather than relying on potentially outdated or generalized prompt information. This grounding in real data ensures agents make informed decisions, reducing errors and increasing the system's ability to adapt to changing conditions and constraints.
Is the GitHub Copilot SDK primarily for professional developers, or can others benefit from its capabilities?
While the GitHub Copilot SDK is designed to empower professional developers by extending agentic AI capabilities into their applications and infrastructure, its benefits ripple outwards. By enabling AI to handle complex, multi-step tasks and integrate directly into various software systems, it streamlines workflows, reduces manual effort, and enhances the adaptability of applications. This ultimately benefits end-users and organizations by leading to more efficient, intelligent, and robust software, even if the direct interaction with the SDK is primarily on the developer's side. The SDK makes AI a fundamental infrastructure component across the software ecosystem.

保持更新

将最新AI新闻发送到您的收件箱。

分享