Support explicit inline custom agent invocation and agent chaining within prompts
Personne n'a encore pris cette issue.
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 6
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
L’issue cite .github/agents et la sélection custom-agent existante comme points de départ ; examine comment les prompts sélectionnent les agents et comment le contexte de la conversation et les artefacts générés sont conservés. Définis et valide une syntaxe inline pour invoquer des agents nommés et chaîner leurs résultats, la finalisation étant démontrée par le fonctionnement prévisible du workflow d’exemple.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- shell
- Domaine
- ai, cli
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100