注意
Copilot 编码智能体 为 公共预览版,可能会变动。 在预览期间,该功能的使用须遵循“GitHub 预发行许可条款”。
Copilot 编码智能体 is an autonomous, AI-powered agent that completes software development tasks on GitHub. Adopting Copilot 编码智能体 in your organization frees your engineering teams to spend more time thinking strategically and less time making routine fixes and maintenance updates in a codebase.
Copilot 编码智能体:
- Joins your team: Developers can delegate work to Copilot unlike IDE-based coding agents that require synchronous pairing sessions. Copilot opens draft pull requests for team members to review and iterates based on feedback, as a developer would.
- Reduces context switching: Developers working in JetBrains IDEs, VS Code, Visual Studio, or GitHub.com can ask Copilot 编码智能体 to create a pull request to complete small tasks without stopping what they are currently doing.
- Executes tasks in parallel: Copilot can work on multiple issues simultaneously, handling tasks in the background while your team focuses on other priorities.
1. Evaluate
Before enabling Copilot 编码智能体 for members, understand how Copilot 编码智能体 will fit into your organization. This will help you evaluate whether Copilot 编码智能体 is suitable for your needs and plan communications and training sessions for developers.
- Learn about Copilot 编码智能体, including the costs, built-in security features, and how it differs from other AI tools your developers may be used to. See About Copilot coding agent.
- Learn about the tasks that Copilot 编码智能体 is best suited for. These are generally well-defined and scoped issues, such as increasing test coverage, fixing bugs or flaky tests, or updating config files or documentation. See Best practices for using Copilot to work on tasks.
- Consider how Copilot 编码智能体 fits alongside other tools in your organization's workflows. For an example scenario that walks through how to use Copilot 编码智能体 alongside other AI features on GitHub, see 将代理式 AI 集成到企业的软件开发生命周期中.
2. Secure
All AI models are trained to meet a request, even if they don't have all the information needed to provide a good answer, and this can lead them to make mistakes. By following best practices, you can build on the default security features of Copilot 编码智能体.
- Give Copilot the information it needs to work successfully in a repository using a
copilot-instructions.md
file. See 为 GitHub Copilot 添加存储库自定义说明. - Set up the Copilot development environment for a repository with access to the tools and package repositories approved by the organization using a
copilot-setup-steps.yml
file and local MCP servers. See Customizing the development environment for Copilot coding agent and Extending Copilot coding agent with the Model Context Protocol (MCP). - Follow best practices for storing secrets securely. See Using secrets in GitHub Actions.
- Enable code security features to further lower the risk of leaking secrets and introducing vulnerabilities into the code. See 在组织中应用 GitHub 建议的安全配置.
- Configure your branch rulesets to ensure that all pull requests raised by Copilot are approved by a second user with write permissions (a sub-option of "Require a pull request before merging"). See 使用规则集在企业中强制实施代码治理, 创建组织中存储库的规则集 and 规则集的可用规则.
3. Pilot
提示
You need GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business or GitHub Copilot Enterprise to use Copilot 编码智能体.
As with any other change to working practices, it's important to run a trial to learn how to deploy Copilot 编码智能体 effectively in your organization or enterprise.
- Gather a cross-functional team for the trial to bring different roles, backgrounds, and perspectives to the project. This will make it easier to ensure that you explore a broad range of ways to define issues, assign work to Copilot, and give clear review feedback.
- Choose an isolated or low-risk repository, for example, one that contains documentation or internal tools. You could create a fresh repository to use as a playground, but Copilot needs context to be successful, so you would need to add a lot of context, including team processes, development environment, and common dependencies.
- Enable Copilot 编码智能体 in the repository and optionally enable third-party MCP servers for enhanced context sharing. See Adding Copilot 编码智能体 to your organization.
- Create repository instructions and pre-install any tools required in the development environment Copilot uses. See Customizing the development environment for Copilot coding agent.
- Identify a few compelling use cases for your organization, for example: test coverage or improving accessibility. See Choose the right type of tasks to give to Copilot in the best practice guide.
- Use best practice to create or refine issues for Copilot in your pilot repository.
- Assign issues to Copilot and prepare team members to review its work.
- Spend time looking at the codebase or documentation in VS Code or GitHub.com, asking Copilot to create a pull request to fix any bugs or small improvements that you identify.
Over the course of the trial, the team should iterate on the repository instructions, installed tools, access to MCP servers, and issue definition to identify how your organization can get the most from Copilot 编码智能体. This process will help you identify your organization's best practices for working with Copilot and plan an effective rollout strategy.
In addition to giving you insight into how to set up Copilot 编码智能体 for success, you'll learn how Copilot uses premium requests and actions minutes. This will be valuable when you come to set and manage your budget for a broader trial or full rollout. See Managing your company's spending on GitHub Copilot.
Enhancing with MCP
The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). MCP provides a standardized way to provide Copilot 编码智能体 with access to different data sources and tools.
Copilot 编码智能体 has access to the full GitHub context of the repository it's working in, including issues and pull requests, using the built-in GitHub MCP server. By default, it's restricted from accessing external data by authentication barriers and a firewall.
You can extend the information available to Copilot 编码智能体 by giving it access to local MCP servers for the tools your organization uses. For example, you might want to provide access to local MCP servers for some of the following contexts:
- Project planning tools: Allow Copilot direct access to private planning documents that are stored outside GitHub in tools like Notion or Figma.
- Augment training data: Each LLM contains training data up to a specific cut-off date. If you're working with fast moving tools, Copilot may not have access to information on new features. You can fill this knowledge gap by making the tool's MCP server available. For example, adding the Terraform MCP server will give Copilot access to the most recently supported Terraform providers.
For more information, see Extending Copilot coding agent with the Model Context Protocol (MCP).
Next steps
When you're satisfied with the pilot, you can:
- Enable Copilot 编码智能体 in more organizations or repositories.
- Identify more use cases for Copilot 编码智能体 and train developers accordingly.
- Continue to collect feedback and measure results.
To assess the impact of a new tool, we recommend measuring the tool's impact on your organization's downstream goals. For a systematic approach to driving and measuring improvements in engineering systems, see GitHub's Engineering System Success Playbook.