github / github/copilot-cli

Support explicit inline custom agent invocation and agent chaining within prompts

オープン
#4,208 コメント 0 件 リアクション 4 件 担当者 0 名 GitHub で見る
area:agents
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the feature or problem you'd like to solve

Copilot CLI currently supports custom agents from .github/agents, but there is no clear, concise way to explicitly invoke a specific agent in the middle of a prompt while preserving the current conversation context and accumulated results. Today, users can select an agent before a task or rely on automatic delegation. However, complex workflows often require intentionally switching between specialized agents during a single task. For example, I may want to: Analyze a codebase using the default agent. Pass the findings to a custom architecture-review agent. Pass the review results to a migration-planning agent. Generate implementation tasks using another specialized agent. The lack of an explicit inline invocation mechanism makes these multi-agent workflows harder to express, less predictable, and more dependent on model inference.

### Proposed solution

Add inline agent invocation syntax that allows users to explicitly delegate part of a workflow to a named custom agent while preserving prior context and generated artifacts.

### Example prompts or workflows

// assuming that '$' would be a trigger to call existing agents selection, like '@' does for files

> Analyze the repository and identify technical debt.
>
> $agent: architecture-review
> Review the findings and propose architectural improvements.
>
> $agent: migration-planner
> Create a phased migration plan based on the review.

### Additional context

Custom agents are one of the most powerful extensibility features in Copilot CLI. Explicit agent invocation would make agent-based workflows easier to discover, document, reproduce, and share among team members.

It would also reduce ambiguity around whether Copilot has actually used a particular custom agent or simply attempted to perform the task itself. For advanced users who invest in creating specialized agents, deterministic invocation would significantly improve confidence and workflow predictability.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Issue では .github/agents と既存の custom-agent 選択を出発点として挙げています。プロンプトがどのようにエージェントを選択するか、また会話コンテキストと生成されたアーティファクトがどのように保持されるかを調査してください。名前付きエージェントを呼び出し、その結果を連鎖させるためのインライン構文を定義して検証し、完了の確認はサンプルワークフローが予測どおりに動作することで行います。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
ai, cli
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。