Microsoft、GitHub Copilot ハーネスと連携したエージェントフレームワークを公開
本文の状態
日本語全文を表示中
詳細モードで約11分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Microsoft Agent Framework
Microsoft は GitHub Copilot を実行エンジンとして組み込んだ Microsoft Agent Framework の統合を発表し、開発者が両者の利点を同時に活用できる環境を整えた。
AI深層分析を開く2026年8月5日 11:23
AI深層分析
キーポイント
Copilot と Agent Framework の統合完了
Microsoft は GitHub Copilot を実行エンジンとして組み込んだ Microsoft Agent Framework の統合を発表し、開発者が両者の利点を同時に活用できる環境を整えた。
.NET および Python での正式リリース
GitHub Copilot Agent が .NET と Python で安定版として利用可能となり、開発者は familiar な抽象化レベルで本番対応のコーディングエージェントを構築できるようになった。
Copilot の実行ループと Framework の管理機能
Coplop がモデル呼び出しやツール呼び出しなどのエージェントループを担う一方、Agent Framework は指示、ストリーミング、可観測性、承認ワークフローの統一されたインターフェースを提供する。
本番環境向けの実装機能
シェル実行、ファイル読み書き、URL 取得、MCP ツールなどの Copilot の機能を、他のエージェントプロバイダと同じランタイムインタフェースに統合して利用可能にする。
MCP サーバーによる機能拡張
ローカルまたはリモートの MCP サーバーを設定することで、ファイルシステムや外部 API など組み込み機能以外のツールとデータへのアクセスが可能になる。
重要な引用
The GitHub Copilot agent is an Agent Framework agent backed by the GitHub Copilot CLI and SDK.
Copilot owns the agent loop (model calls, tool invocation, planning, and session state) while Agent Framework gives you a consistent surface for instructions, tools, streaming, middleware, observability, and human-in-the-loop approval.
Because every capability is gated by a permission request, the agent can only do what you explicitly allow.
Tools that require approval are gated through Copilot’s native pre-tool-use hook and routed to your approval handler.
編集コメントを表示
編集コメント
Microsoft は既存の GitHub Copilot の能力を、より構造化された Agent Framework の枠組みに組み込むことで、企業レベルでの実用性を高めた。開発者は複雑なバックエンド構築なしで、承認フローや可観測性といった本番環境要件を満たすエージェントを迅速に作成できる。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
開発者の間で、コードの推論やファイルの修正、コマンドの実行、開発ツールの操作、そしてリポジトリ全体での作業を可能にするエージェントを構築したいという要望が高まっています。GitHub Copilot はこうしたシナリオに対して強力なコーディング・ハネスを提供していますが、開発者はさらに、観測機能(オバザビリティ)、ミドルウェア、承認ワークフロー、エンタープライズガバナンス、より広範なエージェントエコシステムとの連携など、追加の機能を必要とすることがよくあります。
Microsoft Agent Framework における GitHub Copilot の統合により、これらの世界が結びつきます。GitHub Copilot のエージェント・ハネスをエージェントの実行エンジンとして活用しつつ、Agent Framework が提供する拡張性、ツールモデル、観測機能、ストリーミング、そして人間による承認(ヒューマン・イン・ザ・ループ)の体験を引き続き利用できます。
本日、.NET と Python の両方で GitHub Copilot エージェントが正式にリリースされ、安定版となりました。これにより、親しみやすい Agent Framework の抽象化を用いて、本番環境で使えるコーディングエージェントを構築することがこれまで以上に容易になります。
GitHub Copilot エージェントとは?
GitHub Copilot エージェントは、GitHub Copilot CLI と SDK をバックエンドに持つ Agent Framework 上のエージェントです。Copilot がエージェントのループ(モデル呼び出し、ツールの実行、計画策定、セッション状態)を管理し、Agent Framework は指示、ツール、ストリーミング、ミドルウェア、観測機能、人間による承認に対して一貫したインターフェースを提供します。
その結果、シェル実行、ファイルの読み書き、URL の取得、MCP ツールといった GitHub Copilot 内蔵のコーディングエージェント機能が、他の Agent Framework プロバイダーと同じランタイムインターフェースに統合されたエージェントが完成します。
.NET
using GitHub.Copilot;
using GitHub.Copilot.Rpc;
using Microsoft.Agents.AI;
// Start a Copilot client and turn it into an AIAgent.
await using CopilotClient copilotClient = new();
await copilotClient.StartAsync();
SessionConfig sessionConfig = new()
{
OnPermissionRequest = (request, invocation) =>
Task.FromResult(PermissionDecision.ApproveOnce()),
};
AIAgent agent = copilotClient.AsAIAgent(sessionConfig, ownsClient: true);
AgentResponse response = await agent.RunAsync("Summarize what this project does.");
Console.WriteLine(response);
Python
import asyncio
from agent_framework.github import GitHubCopilotAgent, GitHubCopilotOptions
from copilot.session import PermissionHandler
async def main() -> None:
async with GitHubCopilotAgent(
instructions="You are a helpful assistant.",
default_options=GitHubCopilotOptions(
on_permission_request=PermissionHandler.approve_all,
),
) as agent:
result = await agent.run("Summarize what this project does.")
print(result)
if __name__ == "__main__":
asyncio.run(main())
両方の実装でストリーミング対応も可能です。.NET では RunStreamingAsync(...) を、Python では run(..., stream=True) を使用します。
これで何ができるか
エージェントに実際のシステム機能を与える
Copilot のハーンには、コーディングエージェントに必要な機能が備わっており、各機能はパーミッションハンドラーを通じてオプトインします。
- Shell 実行:コマンド、スクリプト、およびシステムツールの実行
- ファイル操作:既存ファイルの読み取りと新規ファイルの作成
- URL フェッチ:Web コンテンツの取得と処理
すべての機能はパーミッションリクエストによって制御されるため、エージェントが実行できるのはユーザーが明示的に許可した範囲に限られます。ハンドラーは各リクエストを受け取り、承認または拒否の判断を返します。
.NET
static Task PromptPermission(PermissionRequest request, PermissionInvocation invocation)
{
Console.WriteLine($"[Permission Request: {request.Kind}]");
Console.Write("Approve? (y/n): ");
string? input = Console.ReadLine()?.Trim().ToUpperInvariant();
return Task.FromResult(input is "Y" or "YES"
? PermissionDecision.ApproveOnce()
: PermissionDecision.Reject());
}Python
def approve_and_log(request, context):
if request.kind == "shell":
print(f"[Permission: {request.kind}] {getattr(request, 'full_command_text', '')}")
return PermissionHandler.approve_all(request, context)
return PermissionDecisionUserNotAvailable()MCP サーバーで拡張する
モデルコンテキストプロトコル(Model Context Protocol)サーバーを構成することで、組み込み機能を超えたツールとデータを提供できます。ローカル(stdio)またはリモート(http)の接続に対応し、ファイルシステムサーバーから Microsoft Learn ドキュメント API などの遠隔サービスまで幅広く利用可能です。
.NET
SessionConfig sessionConfig = new()
{
OnPermissionRequest = PromptPermission,
McpServers = new Dictionary
{
["filesystem"] = new McpStdioServerConfig
{
Command = "npx",
Args = ["-y", "@modelcontextprotocol/server-filesystem", "."],
Tools = ["*"],
},
["microsoft-learn"] = new McpHttpServerConfig
{
Url = "https://learn.microsoft.com/api/mcp",
Tools = ["*"],
},
},
};
AIAgent agent = copilotClient.AsAIAgent(sessionConfig, ownsClient: true);
Python
mcp_servers = {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"tools": ["*"],
},
"microsoft-learn": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp",
"tools": ["*"],
},
}
agent = GitHubCopilotAgent(
instructions="You are a helpful assistant with filesystem and Microsoft Learn access.",
default_options=GitHubCopilotOptions(
on_permission_request=PermissionHandler.approve_all,
mcp_servers=mcp_servers,
),
)
Add your own tools
Copilot の組み込み機能と並行して、関数をツールとして登録できます。承認が必要なツールは、Copilot のネイティブな事前ツール使用フックを通じてゲートされ、承認ハンドラーにルーティングされます。.NET では AIFunction を ApprovalRequiredAIFunction でラップするか、Python では approval_mode="always_require" を宣言してください。
.NET
// ツールを ApprovalRequiredAIFunction でラップし、OnPermissionRequest の背後でゲートします。
AIFunction getWeather = AIFunctionFactory.Create(GetWeather);
AIAgent agent = copilotClient.AsAIAgent(new SessionConfig
{
OnPermissionRequest = PromptPermission,
Tools = [new ApprovalRequiredAIFunction(getWeather)],
SystemMessage = new SystemMessageConfig
{
Mode = SystemMessageMode.Append,
Content = "You are a helpful weather assistant.",
},
}, ownsClient: true);
Python
from typing import Annotated
from agent_framework import tool
@tool(approval_mode="always_require")
def get_weather_detail(
location: Annotated[str, "The city and state, e.g. San Francisco, CA"],
) -> str:
"""Get a detailed weather report for a location."""
...
agent = GitHubCopilotAgent(
instructions="You are a helpful weather assistant.",
tools=[get_weather_detail],
# The tool's "always_require" decision is routed here to approve or deny.
default_options=GitHubCopilotOptions(on_permission_request=approve_all_requests),
)
セッションの管理
Copilot セッションは自動的に作成されます。セッションを再利用すれば、会話の文脈を次のターンに引き継ぐことができ、セッション ID を指定することで、新しいエージェントインスタンスからでも以前の会話を再開できます。
.NET
// セッション ID で既存の会話を再開します。
AgentSession session = await agent.CreateSessionAsync(existingSessionId);
AgentResponse response = await agent.RunAsync("What did I ask about first?", session);
Python
async with agent:
session = agent.create_session()
await agent.run("What's the weather like in Tokyo?", session=session)
# 同じセッション -> エージェントは東京の情報を記憶しています。
await agent.run("How about London?", session=session)
# 後で会話を再開するために保存します。
session_id = session.service_session_id
その後、新しいエージェントインスタンスで:
async with agent2:
session = agent2.get_session(service_session_id=session_id)
await agent2.run("Which city did I ask about first?", session=session)
プロジェクトガイドラインの共有
エージェントにカスタム指示ディレクトリを指定し、プロジェクト固有またはチームで共有されたガイドラインを読み込ませます。これにより、コードベース全体を通じてエージェントの動作を一貫させることができます。
Python
agent = GitHubCopilotAgent(
instructions="You are a helpful coding assistant.",
default_options=GitHubCopilotOptions(
on_permission_request=PermissionHandler.approve_all,
instruction_directories=[
".copilot/instructions",
"docs/agent-guidelines",
],
),
)
本番環境向けに設計
エージェントシステムにシステムレベルの権限を与えるのは、その使い方を適切に管理できる場合に限り安全です。今回のリリースでは、本番環境で運用するための制御機能が追加されました。
人間による承認(Human-in-the-loop)。シェルコマンドの実行、ファイルへの書き込み、URL の取得、MCP 呼び出し、承認が必要な関数ツールの使用など、すべての重要な操作は、あなたが用意した権限ハンドラーを経由して処理されます。リクエストごとに「承認」「拒否」「確認」を選択でき、デフォルトでは監視なしの動作は一切行われません。信頼できる操作に対してのみ、 selectively に制限を緩和できます。
ネイティブなツール承認機能。Copilot SDK がツール呼び出しループを管理しているため、承認が必要な関数ツールの使用は、SDK 側の「使用前フック(pre-tool-use hook)」を通じて強制されます。エージェントはデフォルトで適切なフックをインストールし、これらのツールをあなたの権限ハンドラーにルーティングします。カスタムフックがこれを迂回しようとした場合は警告が表示されます。この仕組みは、.NET(ApprovalRequiredAIFunction)でも Python(approval_mode="always_require")でも同じように動作します。
組み込みの可観測性機能。GitHub Copilot エージェントは Agent Framework の OpenTelemetry トレースに参加するため、システム内の他のエージェントと同じトレースとテレメトリデータを取得できます。
なぜこれが重要なのか
多くの組織ではすでに GitHub Copilot を活用して開発者の生産性を向上させています。GitHub Copilot エージェント統合により、開発者は GitHub Copilot と Microsoft Agent Framework のどちらかを選ぶ必要なく、これらのコーディング機能をより大規模なエージェント駆動型のワークフローに組み込むことが可能になりました。
これにより、以下が可能になります:
GitHub Copilot のコーディング機能を活用し、リポジトリの状況を理解したエージェントを構築しましょう。
Agent Framework を通じて、カスタムツールや MCP サーバー、エンタープライズサービスを統合できます。
異なるエージェントプロバイダー間でも、承認・ガバナンス・観測性の体験を一貫して適用可能です。
既存の Agent Framework への投資を活かしつつ、GitHub Copilot の進化し続けるコーディングハネスの恩恵も受けられます。
コードレビューアシスタントやリポジトリ管理エージェント、開発者用コパイロット、ソフトウェアエンジニアリングワークフローを構築する場合でも、GitHub Copilot ハネスは同じ Agent Framework プログラミングモデルを用いてこれらの体験を実現します。
ハネスの選択肢
GitHub Copilot エージェントは、Microsoft Agent Framework でエージェントを構築する複数の方法の一つです。
GitHub Copilot は、プランニング、ツール実行、シェルアクセス、ファイル操作、URL 取得、MCP 統合を内蔵でサポートする、強力なコーディング特化型のハネスを提供します。多くのソフトウェアエンジニアリングのシナリオにおいて、これは優れた初期設定済みエージェントランタイム体験をもたらします。
より柔軟にカスタマイズ可能なハネスを自分で組み立てたい場合(ツールやプランニング、メモリ、承認、観測性を一つずつ接続していくような)も、Agent Framework は対応しています。詳細は、.NET と Python の両方で段階的な手順を紹介する「Build your own claw and agent harness」シリーズをご覧ください。
エージェントは認証された GitHub Copilot CLI 上で動作するため、Copilot CLI のインストールとアクティブな GitHub Copilot サブスクリプションが必要です。また、.NET では .NET 8 以上、Python では 3.11 以上が必須です。
.NET
dotnet add package Microsoft.Agents.AI.GitHub.Copilot
Python
pip install agent-framework-github-copilot
両言語で共通する Copilot CLI の設定は環境変数を通じて行われます。
これらの CLI 設定はデフォルトで環境変数を参照しますが、コード内で直接設定することも可能です。Python では GitHubCopilotOptions(引数:cli_path, model, timeout, log_level, base_directory)を指定して渡すことで、環境変数の値を上書きできます。.NET では CopilotClientOptions(引数:CliPath, LogLevel, BaseDirectory, WorkingDirectory)でクライアントを設定し、セッションごとに SessionConfig.Model で使用するモデルを指定します。
- 変数名:説明 / デフォルト
- GITHUB_COPILOT_CLI_PATH:Copilot CLI の実行ファイルへのパス / copilot
- GITHUB_COPILOT_MODEL:使用するモデル(例:gpt-5, claude-sonnet-4) / サーバーのデフォルト
- GITHUB_COPILOT_TIMEOUT:リクエストタイムアウト(秒単位) / 60
- GITHUB_COPILOT_BASE_DIRECTORY:CLI のセッション状態と設定を保存するディレクトリ / ~/.copilot
各言語の実行可能なサンプルは以下の通りです。
.NET — samples/02-agents/AgentProviders/github-copilot
Python — samples/02-agents/providers/github_copilot
コミュニティに参加しよう
ご質問やフィードバック、あるいはユースケースについてチームと議論したい場合は、Microsoft Agent Framework Office Hours にご参加ください。
GitHub Copilot ハーネスとエージェントフレームワークを活用して、本番環境で使えるエージェントを構築する方法
この記事は、Microsoft エージェントフレームワークの公式ブログで最初に公開されました。
原文を表示
Developers increasingly want to build agents that can reason about code, modify files, execute commands, interact with developer tools, and work across entire repositories. While GitHub Copilot already provides a powerful coding harness for these scenarios, developers often need additional capabilities such as observability, middleware, approval workflows, enterprise governance, and integration with broader agent ecosystems.
The GitHub Copilot integration in Microsoft Agent Framework brings these worlds together. You can now use GitHub Copilot’s agentic harness as the execution engine for your agents while continuing to leverage Agent Framework’s extensibility, tooling model, observability, streaming, and human-in-the-loop approval experiences.
Today, we’re excited to announce that the GitHub Copilot Agent is now released and stable for both .NET and Python making it easier than ever to build production-ready coding agents using familiar Agent Framework abstractions.
What is the GitHub Copilot Agent?
The GitHub Copilot agent is an Agent Framework agent backed by the GitHub Copilot CLI and SDK. Copilot owns the agent loop (model calls, tool invocation, planning, and session state) while Agent Framework gives you a consistent surface for instructions, tools, streaming, middleware, observability, and human-in-the-loop approval.
The result: an agent with Copilot’s built-in coding-agent capabilities — shell execution, file read/write, URL fetching, and MCP tools — wired into the same run interface as every other Agent Framework provider.
.NET
using GitHub.Copilot;
using GitHub.Copilot.Rpc;
using Microsoft.Agents.AI;
// Start a Copilot client and turn it into an AIAgent.
await using CopilotClient copilotClient = new();
await copilotClient.StartAsync();
SessionConfig sessionConfig = new()
{
OnPermissionRequest = (request, invocation) =>
Task.FromResult(PermissionDecision.ApproveOnce()),
};
AIAgent agent = copilotClient.AsAIAgent(sessionConfig, ownsClient: true);
AgentResponse response = await agent.RunAsync("Summarize what this project does.");
Console.WriteLine(response);
Python
import asyncio
from agent_framework.github import GitHubCopilotAgent, GitHubCopilotOptions
from copilot.session import PermissionHandler
async def main() -> None:
async with GitHubCopilotAgent(
instructions="You are a helpful assistant.",
default_options=GitHubCopilotOptions(
on_permission_request=PermissionHandler.approve_all,
),
) as agent:
result = await agent.run("Summarize what this project does.")
print(result)
if __name__ == "__main__":
asyncio.run(main())
Both give you streaming too: RunStreamingAsync(...) in .NET, run(..., stream=True) in Python.
What you can do with it
Give an agent real system capabilities
Copilot’s harness comes with the abilities a coding agent needs, and you opt in to each one through the permission handler:
Shell execution — run commands, scripts, and system tools.
File operations — read existing files and write new ones.
URL fetching — pull in and process web content.
Because every capability is gated by a permission request, the agent can only do what you explicitly allow. The handler receives each request and returns an approve/deny decision:
.NET
static Task<PermissionDecision> PromptPermission(PermissionRequest request, PermissionInvocation invocation)
{
Console.WriteLine($"[Permission Request: {request.Kind}]");
Console.Write("Approve? (y/n): ");
string? input = Console.ReadLine()?.Trim().ToUpperInvariant();
return Task.FromResult(input is "Y" or "YES"
? PermissionDecision.ApproveOnce()
: PermissionDecision.Reject());
}
Python
def approve_and_log(request, context):
if request.kind == "shell":
print(f"[Permission: {request.kind}] {getattr(request, 'full_command_text', '')}")
return PermissionHandler.approve_all(request, context)
return PermissionDecisionUserNotAvailable()
Extend it with MCP servers
Configure Model Context Protocol servers — local (stdio) or remote (http) — to give the agent tools and data beyond the built-ins, from a filesystem server to remote services like the Microsoft Learn documentation API.
.NET
SessionConfig sessionConfig = new()
{
OnPermissionRequest = PromptPermission,
McpServers = new Dictionary<string, McpServerConfig>
{
["filesystem"] = new McpStdioServerConfig
{
Command = "npx",
Args = ["-y", "@modelcontextprotocol/server-filesystem", "."],
Tools = ["*"],
},
["microsoft-learn"] = new McpHttpServerConfig
{
Url = "https://learn.microsoft.com/api/mcp",
Tools = ["*"],
},
},
};
AIAgent agent = copilotClient.AsAIAgent(sessionConfig, ownsClient: true);
Python
mcp_servers = {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"tools": ["*"],
},
"microsoft-learn": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp",
"tools": ["*"],
},
}
agent = GitHubCopilotAgent(
instructions="You are a helpful assistant with filesystem and Microsoft Learn access.",
default_options=GitHubCopilotOptions(
on_permission_request=PermissionHandler.approve_all,
mcp_servers=mcp_servers,
),
)
Add your own tools
Register functions as tools alongside Copilot’s built-ins. Tools that require approval are gated through Copilot’s native pre-tool-use hook and routed to your approval handler. Wrap an AIFunction in ApprovalRequiredAIFunction in .NET, or declare approval_mode="always_require" in Python.
.NET
// Wrap a tool in ApprovalRequiredAIFunction to gate it behind OnPermissionRequest.
AIFunction getWeather = AIFunctionFactory.Create(GetWeather);
AIAgent agent = copilotClient.AsAIAgent(new SessionConfig
{
OnPermissionRequest = PromptPermission,
Tools = [new ApprovalRequiredAIFunction(getWeather)],
SystemMessage = new SystemMessageConfig
{
Mode = SystemMessageMode.Append,
Content = "You are a helpful weather assistant.",
},
}, ownsClient: true);
Python
from typing import Annotated
from agent_framework import tool
@tool(approval_mode="always_require")
def get_weather_detail(
location: Annotated[str, "The city and state, e.g. San Francisco, CA"],
) -> str:
"""Get a detailed weather report for a location."""
...
agent = GitHubCopilotAgent(
instructions="You are a helpful weather assistant.",
tools=[get_weather_detail],
# The tool's "always_require" decision is routed here to approve or deny.
default_options=GitHubCopilotOptions(on_permission_request=approve_all_requests),
)
Manage sessions
Copilot sessions are created automatically. Reuse a session to keep context across turns, and resume an earlier conversation by its session ID — even from a new agent instance.
.NET
// Resume an existing conversation by its session id.
AgentSession session = await agent.CreateSessionAsync(existingSessionId);
AgentResponse response = await agent.RunAsync("What did I ask about first?", session);
Python
async with agent:
session = agent.create_session()
await agent.run("What's the weather like in Tokyo?", session=session)
# Same session -> the agent remembers Tokyo.
await agent.run("How about London?", session=session)
# Persist this to resume the conversation later.
session_id = session.service_session_id
Later, in a new agent instance:
async with agent2:
session = agent2.get_session(service_session_id=session_id)
await agent2.run("Which city did I ask about first?", session=session)
Share project guidelines
Point the agent at custom instruction directories to load project-specific or team-shared guidelines, keeping the agent’s behavior consistent across a codebase.
Python
agent = GitHubCopilotAgent(
instructions="You are a helpful coding assistant.",
default_options=GitHubCopilotOptions(
on_permission_request=PermissionHandler.approve_all,
instruction_directories=[
".copilot/instructions",
"docs/agent-guidelines",
],
),
)
Built for production
Giving an agent system-level abilities is only safe if you can govern how it uses them. This release includes the controls you need to run it in production.
Human-in-the-loop approval. Every sensitive action — shell commands, file writes, URL fetches, MCP calls, and approval-required function tools — flows through a permission handler you provide. Approve, deny, or prompt per request; by default nothing runs without oversight, and you relax it selectively for trusted operations.
Native tool approval. Because the Copilot SDK owns the tool-calling loop, approval for approval-required function tools is enforced through the SDK’s pre-tool-use hook. The agent installs a sensible default hook that routes those tools to your permission handler — and warns you if a custom hook would bypass it. This works the same way in both .NET (ApprovalRequiredAIFunction) and Python (approval_mode="always_require").
Built-in observability. The GitHub Copilot agent participates in Agent Framework’s OpenTelemetry tracing, so you get the same traces and telemetry as every other agent in your system.
Why this matters
Many organizations are already using GitHub Copilot to accelerate developer productivity. With the GitHub Copilot Agent integration, developers can now bring those same coding capabilities into larger agent-driven workflows without having to choose between GitHub Copilot and Microsoft Agent Framework.
This means you can:
Build repository-aware agents that leverage GitHub Copilot’s coding capabilities.
Integrate custom tools, MCP servers, and enterprise services through Agent Framework.
Apply consistent approval, governance, and observability experiences across different agent providers.
Reuse existing Agent Framework investments while taking advantage of GitHub Copilot’s evolving coding harness.
Whether you’re building code review assistants, repository maintenance agents, developer copilots, or software engineering workflows, the GitHub Copilot harness enables these experiences using the same Agent Framework programming model.
Harness options
The GitHub Copilot Agent is one of several ways to build agents with Microsoft Agent Framework.
GitHub Copilot provides a powerful coding-focused harness with built-in support for planning, tool execution, shell access, file manipulation, URL retrieval, and MCP integration. For many software engineering scenarios, this provides an excellent out-of-the-box agent runtime experience.
If you want a more configurable harness that you assemble yourself (wiring up tools, planning, memory, approvals, and observability piece by piece), Agent Framework supports that too. See the Build your own claw and agent harness series for a step-by-step walkthrough in both .NET and Python.
Getting started
The agent runs on top of an authenticated GitHub Copilot CLI, so you’ll need the Copilot CLI installed and an active GitHub Copilot subscription. .NET requires .NET 8+; Python requires 3.11+.
.NET
dotnet add package Microsoft.Agents.AI.GitHub.Copilot
Python
pip install agent-framework-github-copilot
The underlying Copilot CLI is configured through environment variables shared by both languages:
These CLI settings default to environment variables, but you can also set them in code. In Python, pass them through GitHubCopilotOptions (cli_path, model, timeout, log_level, base_directory), which override the environment. In .NET, configure the client with CopilotClientOptions (CliPath, LogLevel, BaseDirectory, WorkingDirectory) and set the model per session on SessionConfig.Model.
Variable
Description
Default
GITHUB_COPILOT_CLI_PATH
Path to the Copilot CLI executable
copilot
GITHUB_COPILOT_MODEL
Model to use (e.g. gpt-5, claude-sonnet-4)
Server default
GITHUB_COPILOT_TIMEOUT
Request timeout in seconds
60
GITHUB_COPILOT_BASE_DIRECTORY
Directory for CLI session state and config
~/.copilot
Explore the runnable samples for each language:
.NET — samples/02-agents/AgentProviders/github-copilot
Python — samples/02-agents/providers/github_copilot
Join the community
Have questions, feedback, or want to discuss your use case with the team? Join the Microsoft Agent Framework Office Hours.
The post Build Production-Ready Agents with the GitHub Copilot Harness and Agent Framework appeared first on Microsoft Agent Framework.
News to Guide
ニュースの次に確認する
発表内容を、現在の料金や仕様と照らし合わせられる関連ガイドです。
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み