mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
feat(core): Enable generalist agent (#19665)
This commit is contained in:
@@ -228,6 +228,18 @@ export function renderSubAgents(subAgents?: SubAgentOptions[]): string {
|
||||
|
||||
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
|
||||
|
||||
### Strategic Orchestration & Delegation
|
||||
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
|
||||
|
||||
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
|
||||
|
||||
**High-Impact Delegation Candidates:**
|
||||
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
|
||||
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
|
||||
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
|
||||
|
||||
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
|
||||
|
||||
<available_subagents>
|
||||
${subAgentsXml}
|
||||
</available_subagents>
|
||||
|
||||
Reference in New Issue
Block a user