Support explicit inline custom agent invocation and agent chaining within prompts
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Das Issue nennt .github/agents und die bestehende custom-agent-Auswahl als Ausgangspunkte; untersuche, wie Prompts Agents auswählen und wie Gesprächskontext und generierte Artefakte erhalten bleiben. Definiere und validiere eine Inline-Syntax zum Aufrufen benannter Agents und zum Verketten ihrer Ergebnisse, wobei der Abschluss dadurch gezeigt wird, dass der Beispiel-Workflow vorhersehbar funktioniert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- shell
- Bereich
- ai, cli
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100