Piloting agents in GitHub Copilot - Christopher Harrison, Microsoft

AI EngineerAbout 7 min readJul 26, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

GitHub Copilot, AI pair programmer, context, prompts, code readability, comments, project structure, instruction files, intent, clarity, specificity, code completion, chat mode, edit mode, local agent mode, Copilot Coding Agent, issues, GitHub Actions, Model Context Protocol (MCP), security, GitHub Spaces.

Main Topics and Key Points

Introduction and Logistics

  • The speaker announces that the same lab will be run again at 3:30 PM, even though it has a different title and abstract.
  • Participants are instructed to check their email associated with their GitHub account and accept the invitation to join an organization to get access to GitHub Copilot.

GitHub Copilot Overview

  • GitHub Copilot is described as an "AI pair programmer," emphasizing collaboration and assistance in solving problems.
  • It has strengths and weaknesses, and is best suited for specific workloads.
  • The session will cover agent mode, edit mode, ask mode, and the new Copilot Coding Agent.
  • Context is crucial for effective use of Copilot.

The Importance of Context

  • Context is illustrated with a story about deciding where to go for brunch, highlighting how additional information refines the solution.
  • Context goes beyond just the prompt; it includes code readability, comments, and project structure.
  • Readable code, clear naming conventions, and comments help Copilot understand the code.
  • A good project structure allows Copilot to quickly find necessary resources.

Helping Copilot Help You

  • Be clear about your intent and specific about what you want Copilot to do.
  • Avoid being passive-aggressive with Copilot; provide explicit instructions.

Different Workloads of Copilot

  • Code Completion: Inline suggestions as you type.
  • Chat Mode: Includes "ask" for single-shot queries and "edit" for editing multiple files.
  • Local Agent Mode: Copilot leads the way, explores the project, runs external tasks, and self-heals.
  • Copilot Coding Agent: Assign issues to Copilot and let it work asynchronously.

Copilot Coding Agent in Detail

  • Coding Agent allows assigning issues to Copilot for asynchronous task completion.
  • The speaker emphasizes the importance of providing clear and specific instructions in the issue description.
  • Copilot supports instruction files (copilot-instructions.md) for high-level overviews, coding standards, language guidance, and project structure.
  • Coding Agent uses GitHub Actions, with a special action (copilot setup steps) to install necessary dependencies and configure the environment.
  • Copilot explores the project to gather information, highlighting the importance of good code, clear comments, and a well-structured project.

Setting up the Lab Environment

  • Participants are instructed to create a repository within the Octo organization, naming it after their GitHub handle.
  • The lab uses code spaces, so no local installation is required.

Model Context Protocol (MCP)

  • MCP allows Copilot to access external data sources and perform tasks.
  • The request goes to Copilot, then to the MCP server, which accesses external resources.
  • MCP servers can be first-party (e.g., Azure, Playwright) or community-created.
  • Users should trust third-party MCP servers due to their ability to access data and perform tasks.

Instructions Files in Detail

  • Copilot instructions are always available inside of chat.
  • Local chat allows creating instructions files specific to a type of task.
  • Instructions files can be applied to specific file types using the "apply to" directive.
  • These files become part of the repository, improving productivity and ensuring consistent code generation.

Security Considerations with Coding Agent

  • Coding Agent is built with security in mind, using GitHub Actions in an ephemeral space.
  • Copilot has read access to the repository and write access only to the branch it creates.
  • It does not have access to external services unless the firewall is opened.
  • The initial setup workflow can install necessary services.

Pull Request Validation

  • The speaker emphasizes the importance of validating pull requests, even when code is generated by AI.
  • Tests are not automatically run on Copilot-generated pull requests; they must be manually triggered.
  • This ensures that code is reviewed and validated before merging.

Internal Libraries and Fine-Tuning

  • Copilot can use internal libraries if it sees examples of how they are used.
  • Instruction files can list APIs and provide guidance.
  • MCP servers can provide access to internal libraries.
  • Fine-tuning is not currently supported.

Important Examples, Case Studies, or Real-World Applications Discussed

  • Brunch Story: Illustrates the importance of context in communication and problem-solving.
  • Creating Endpoints for Games: Used as an example to demonstrate Copilot Coding Agent and the use of instruction files.
  • Dependabot PR: Used to illustrate the importance of pull request validation and security considerations.

Step-by-Step Processes, Methodologies, or Frameworks Explained

  • Setting up the Lab Environment: Instructions for creating a repository within the Octo organization and using code spaces.
  • Using Copilot Coding Agent: Steps for assigning issues, creating instruction files, and configuring the environment using GitHub Actions.
  • Implementing MCP: Explanation of how to set up and use MCP servers to allow Copilot to access external data sources.

Key Arguments or Perspectives Presented, with Their Supporting Evidence

  • Context is Crucial: Supported by the brunch story and examples of how code readability, comments, and project structure contribute to context.
  • Be Explicit with Copilot: Supported by the example of painting a wall a specific shade of red.
  • Security is Paramount: Supported by the explanation of how Coding Agent is built on top of GitHub Actions and the security measures in place.
  • Fundamentals of DevOps Don't Change: Supported by the emphasis on pull request validation and testing, even when code is generated by AI.

Notable Quotes or Significant Statements with Proper Attribution

  • "GitHub Copilot has been given this tag of your AI pair programmer... it's actually I think honestly the best way to describe and to think about GitHub copilot."
  • "Don't be passive aggressive with co-pilot."
  • "Just because I introduce AI does not mean that any of the fundamentals of DevOps change."

Technical Terms, Concepts, or Specialized Vocabulary with Brief Explanations

  • AI Pair Programmer: A description of GitHub Copilot, emphasizing its role as a collaborative tool.
  • Context: The surrounding information that helps Copilot understand the task at hand.
  • Prompts: The instructions given to Copilot.
  • Code Readability: The ease with which code can be understood by humans and AI.
  • Comments: Explanatory notes within the code.
  • Project Structure: The organization of files and directories within a project.
  • Instruction Files: Markdown files that provide high-level overviews, coding standards, and project structure information to Copilot.
  • Intent: The purpose or goal of a task.
  • Clarity: The quality of being easily understood.
  • Specificity: The quality of being precise and detailed.
  • Code Completion: The ability of Copilot to suggest code as you type.
  • Chat Mode: A mode in Copilot that allows you to interact with it through natural language.
  • Edit Mode: A mode in Copilot that allows you to edit multiple files in one shot.
  • Local Agent Mode: A mode in Copilot where it leads the way, explores the project, and runs external tasks.
  • Copilot Coding Agent: A feature that allows you to assign issues to Copilot for asynchronous task completion.
  • Issues: Tasks or problems that need to be addressed in a project.
  • GitHub Actions: A platform for automating software workflows.
  • Model Context Protocol (MCP): A protocol that allows Copilot to access external data sources and perform tasks.
  • Security: Measures taken to protect against unauthorized access or use.
  • GitHub Spaces: A feature on github.com that allows you to point it at a repository and specific files and say here's our knowledge bases, here's how we want our code to be created, here's all of our standards, here's good examples.

Logical Connections Between Different Sections and Ideas

  • The introduction sets the stage for the lab and emphasizes the importance of context.
  • The overview of GitHub Copilot introduces the different modes and features that will be discussed.
  • The discussion of context leads into the importance of code readability, comments, and project structure.
  • The explanation of Copilot Coding Agent builds on the previous sections, demonstrating how to use instruction files and GitHub Actions to configure the environment.
  • The security considerations section reinforces the importance of pull request validation and testing.

Data, Research Findings, or Statistics Mentioned

  • No specific data, research findings, or statistics are mentioned.

Brief Synthesis/Conclusion of the Main Takeaways

GitHub Copilot is a powerful AI pair programmer that can significantly enhance productivity, but it requires clear communication, a well-structured project, and a strong emphasis on security. Context is crucial for effective use, and users should leverage instruction files and GitHub Actions to configure the environment and guide Copilot's behavior. Despite the benefits of AI-assisted coding, the fundamentals of DevOps, such as pull request validation and testing, remain essential.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.