Support explicit inline custom agent invocation and agent chaining within prompts
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
La issue indica .github/agents e la selezione custom-agent esistente come punti di partenza; esamina come i prompt selezionano gli agenti e come vengono conservati il contesto della conversazione e gli artefatti generati. Definisci e convalida una sintassi inline per invocare agenti denominati e concatenare i loro risultati, dimostrando il completamento attraverso il funzionamento prevedibile del workflow di esempio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- shell
- Ambito
- ai, cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100