Support explicit inline custom agent invocation and agent chaining within prompts
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 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 选择列为起点;检查 prompts 如何选择 agents,以及对话上下文和生成的 artifacts 如何得到保留。定义并验证用于调用命名 agents 以及串联其结果的内联语法,并通过示例 workflow 能够按预期稳定运行来展示完成情况。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell
- 领域
- ai, cli
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100