The `agent-framework-github-copilot` library integrates the GitHub Copilot SDK with the Microsoft Agent Framework, providing Python developers with powerful coding-oriented AI capabilities. These capabilities include shell command execution, file operations, URL fetching, and Model Context Protocol (MCP) server integration. It is part of the broader Microsoft Agent Framework, which has unified previously separate AI frameworks like Semantic Kernel and AutoGen. The library is actively developed, with its current version being 1.0.0b260409, and receives regular updates.
pip install agent-framework-github-copilotVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize and run a basic GitHub Copilot Agent. It requires the GitHub Copilot CLI to be installed and authenticated separately. The agent is created with default options and then used to process a simple query.
Review the official migration guide for Agent Framework 1.0.0 to adapt agent code to the new `ToolInvocation` and `ToolResult` types. Ensure all Agent Framework related packages are updated to their stable 1.x versions.
Follow the official GitHub Copilot CLI installation and authentication guides. This typically involves installing the CLI and logging in via `gh auth login` or similar commands, potentially configuring environment variables for authentication tokens.
Identify repositories using Copilot coding agent with affected runner types (check `.github/workflows/copilot-setup-steps.yml`). Review and update network configurations to ensure connectivity to the new, plan-specific Copilot hostnames by the specified date.
For tasks involving long-running shell commands, consider breaking them down into smaller, quicker steps, or use alternative methods for result capture if the agent's direct execution proves unreliable. Be mindful of this limitation when designing agent workflows.
Exercise caution when using the Copilot Agent for extensive code modifications or refactoring in Visual Studio. Regularly commit changes, use version control, and carefully review agent-generated or edited code before saving. This issue is acknowledged by Microsoft and is under investigation.
Update your network configuration (firewalls, proxy settings, etc.) to allow outgoing connections to the new GitHub Copilot hostnames: `api.business.githubcopilot.com`, `api.enterprise.githubcopilot.com`, and `api.individual.githubcopilot.com`, depending on the Copilot plan(s) in use.
Ensure the package is installed using `pip install agent-framework-github-copilot`. If you intend to use the full framework, `pip install agent-framework` installs all sub-packages, including the GitHub Copilot integration.
While a direct fix for this behavior is not yet available, it is a known issue. It is recommended to save your work frequently, use version control to track changes, and meticulously review any code generated or modified by the Copilot Agent in Visual Studio. If issues occur, manually revert or correct the code.