Registry / llm-agents / agent-framework-github-copilot

agent-framework-github-copilot

JSON →
library1.0.0rc1pypypi✓ verified 85d ago

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-copilot
INSTALL
IMPORT
SIG · AGENT-FRAMEWORK-GI
A
agent-framework-github-copilot
llm-agentspythonv1.0.0rc1
Install
4.6s avg
Import
2366ms
Disk
96MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0rc1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 4.13s
py 3.11
✓ —
✓ 5.15s
py 3.12
✓ —
✓ 4.55s
py 3.13
✓ —
✓ 4.65s
py 3.9
✕ build_error
✕ build_error
96MB installed
● package 96MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GitHubCopilotAgent
from agent_framework.github import GitHubCopilotAgent
GitHubCopilotOptions
from agent_framework.github import GitHubCopilotOptions

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.

import asyncio import os from agent_framework.github import GitHubCopilotAgent, GitHubCopilotOptions async def main(): # Ensure GitHub Copilot CLI is installed and authenticated. # For this example, we assume authentication is handled externally or via environment variables. # Replace with your actual authentication token or method if needed. # os.environ['GITHUB_TOKEN'] = os.environ.get('GITHUB_TOKEN', 'YOUR_GITHUB_TOKEN') options = GitHubCopilotOptions() agent = GitHubCopilotAgent(options) print("Asking the GitHub Copilot Agent: What is a Python list comprehension?") response = await agent.run_async("What is a Python list comprehension?") print(f"Agent Response: {response.output}") if __name__ == "__main__": asyncio.run(main())
agent-framework-github-copilot --version
Debug
Known issues
breakingVersion 1.0.0 introduced breaking changes related to `ToolInvocation` and `ToolResult` types, requiring updates to agent implementations. Additionally, dependency floors now mandate released `>=1.0.0,<2` packages, breaking compatibility with older Release Candidate (RC) installs.
fix
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.
affects: >=1.0.0
gotchaThe GitHub Copilot CLI must be installed and authenticated separately for the `agent-framework-github-copilot` to function. This is a crucial prerequisite for utilizing the library's features.
fix
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.
affects: All
breakingEffective February 27, 2026, the Copilot coding agent will use subscription-based network routing, connecting to different hostnames (e.g., `api.business.githubcopilot.com`, `api.enterprise.githubcopilot.com`, `api.individual.githubcopilot.com`). Self-hosted runners or those with Azure private networking need to allow these new hostnames.
fix
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.
affects: All versions used with Copilot coding agent on affected runners after 2026-02-27
gotchaThe Copilot Agent may struggle to obtain results from shell commands that have longer execution times, potentially limiting its effectiveness for complex or time-consuming tasks.
fix
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.
affects: All
gotchaUsers have reported issues in Visual Studio where the GitHub Copilot Agent can cause code loss or introduce build-breaking errors due to incomplete or improperly applied code generation/editing.
fix
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.
affects: All (specific to Visual Studio integration)
Errors
Common errors & fixes
Copilot coding agent tasks may fail because the agent runtime will be unable to communicate with GitHub systems.
Network configuration changes for the Copilot coding agent (effective February 27, 2026) mean it connects to new, plan-specific hostnames. If your network (e.g., for self-hosted runners) doesn't allow these, communication will fail.
fix
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.
ModuleNotFoundError: No module named 'agent_framework.github'
The `agent-framework-github-copilot` package, or the encompassing `agent-framework` package, has not been installed correctly, or the Python environment is not configured to find it.
fix
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.
Visual Studio: 'parts of my existing code get unexpectedly deleted, and the output is often incomplete — leaving the file in a broken, unbuildable state.'
The GitHub Copilot Agent in Visual Studio can sometimes interfere with existing code, resulting in incomplete outputs or corrupted file structures during code generation or editing, which leads to build errors.
fix
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.
Upgrade
Version history
1.0.0rc1latest on PyPI · released Jun 4, 2026
Audit
Dependencies
agent-frameworkrequiredThis package is an integration for the Microsoft Agent Framework and relies on its core functionalities.
GitHub Copilot CLIrequiredThe GitHub Copilot CLI is a prerequisite for the agent-framework-github-copilot to function correctly and requires separate installation and authentication.
Agent activity
60 hits · last 30 days
node
54
OpenAI (training)
1
Resources
agent-framework-github-copilot — pip install agent-framework-github-copilot · libregistry