[FEATURE] Support GitHub Copilot as a model provider through a Copilot SDK harness
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start by reading the existing native harnesses in go/harness/claude and go/harness/codex, and the HarnessSpec type that gates them. Before any code, the two open questions need answers: how a GitHub App installation token reaches the Copilot runtime, and whether a pending permission or elicitation survives a DATA restore. Done means a design agreed in the thread, then new code under go/core/internal/translator/copilot and go/harness/copilot.
索引モデルが issue の本文から書いたものです。
説明
📋 Prerequisites
- I have searched the existing issues to avoid creating a duplicate
- By submitting this issue, you agree to follow our Code of Conduct
📝 Feature Summary
Add a copilot Harness, built on the GitHub Copilot Go SDK, so agents can run on a GitHub Copilot subscription.
❓ Problem Statement / Motivation
This follows up on #172, which asked whether kagent could use a Copilot API key instead of OpenAI. It was closed because it wasn't clear which Copilot was meant. This one is about GitHub Copilot.
None of the ModelConfig providers can use a GitHub Copilot subscription today. Teams that already have Copilot Business or Enterprise, with model access and policies set by their org admins, need a separate provider account and API key before they can try kagent.
GitHub now ships an official Copilot SDK. It is generally available and has a Go module, github.com/github/copilot-sdk/go. Its docs cover running in backend services and a server-to-server flow that bills usage to the organization that owns a GitHub App installation.
💡 Proposed Solution
The SDK sends prompts over JSON-RPC to the Copilot agent runtime (the Copilot CLI), and the runtime runs the tool-use loop itself. Claude Code and the Codex App Server also run their own loops, and kagent already runs them as native harnesses. Microsoft Agent Framework integrates the SDK the same way, as an agent provider. I'd add Copilot as a third native harness:
- a
copilotfield onHarnessSpec, next tokagent,codex,claude, andbyo - a
ModelConfigprovider, for exampleGitHubCopilot, whose Secret holds the GitHub token and whosemodelis a Copilot model ID (the SDK'sListModelsreturns the models available to that token) - a translator under
go/core/internal/translator/copilotthat compiles theAgentTemplateinto the harness config, like the Claude and Codex translators - a runtime under
go/harness/copilotthat uses the Go SDK to drive a Copilot CLI pinned in the image, as the Claude image pins Claude Code
The Go SDK has a counterpart for most of what the Claude and Codex harnesses support today:
| kagent | Copilot Go SDK |
|---|---|
| Streaming text and tool activity | Session.On events |
RemoteMCPServer tools |
MCPServers (remote http and sse servers) |
| Skills | SkillDirectories |
| Shared agents | CustomAgents |
| MCP tool approval | OnPermissionRequest |
| Ask-user questions and MCP elicitations | OnElicitationRequest |
Native state in DurableDir |
ClientOptions.BaseDirectory (sets COPILOT_HOME) |
| Continuation | ResumeSession |
| Cancellation | Session.Abort |
| Tracing | Telemetry, with W3C trace context propagation |
Open questions:
- How does the GitHub token reach the runtime? In the server-to-server flow it's a GitHub App installation token that expires after an hour. Harness processes get a placeholder from Substrate gateway injection, and it's not clear whether the Copilot runtime accepts one, or which GitHub origins the gateway would need to cover.
- Can a pending approval survive a DATA restore? The Claude and Codex harnesses park approvals and questions across a restore. I haven't confirmed that a Copilot session can resume with a permission or elicitation request still open.
🔄 Alternatives Considered
- A Copilot model adapter in the
kagentharness, which is closest to what #172 asked for. It would have to pause the Copilot runtime at each tool call, pass the call to ADK, and feed the result back, keeping two agent loops in sync. - A
byoharness. This works today without kagent changes: build an image that runs the SDK and implements kagent's private A2A contract. Every team that wants Copilot would then maintain the image, event mapping, approvals, and credential handling on its own, and the BYO contract isn't documented yet (#2884). - GitHub Models through the OpenAI provider's
baseUrl. That service was retired on July 30, 2026. It was also separate from Copilot, so it never used a Copilot subscription.
🎯 Affected Service(s)
Multiple services / System-wide
📚 Additional Context
- Earlier discussion: #172, my comment, and the request to open a new issue
- Copilot SDK and its Go API reference
- SDK docs: agent loop, backend services, server-to-server tokens
- Harnesses to follow:
go/harness/claude,go/harness/codex
🙋 Are you willing to contribute?
- I am willing to submit a PR for this feature
- 主要言語
- Go
- スター
- 4.5k
- フォーク
- 937
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 150
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
kagent-dev/kagent のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
kagent-dev/kagent#3792 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
kagent-dev/kagent#3790 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
kagent-dev/kagent#3789 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
kagent-dev/kagent#3787 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Python memory summarization fails for Gemini models: the request has no model name対応中かも @BahaaMattar が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
kagent-dev/kagent#3710 ·
メンテナーはふだん 1 日以内に返信
kagent-dev/kagent の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
docker/model-runner#1118 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100