mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-21 17:23:37 -07:00
1c5646b68d
- Add TeamSelectionDialog component for team discovery UX - Intercept startup flow in AppContainer to show team selection if needed - Update DialogManager to orchestrate team selection UI - Add handleTeamSelect and isTeamSelectionActive to UI contexts - Fix pre-existing StyledLine compilation error in TableRenderer - Refactor promptProvider-teams.test.ts to resolve type errors - Add unit tests for TeamSelectionDialog - Fix ESLint warnings for exhaustive-deps in AppContainer - Resolve syntax corruptions in AppContainer.tsx and DialogManager.tsx
2.3 KiB
2.3 KiB
Agent Teams: Research & Implementation Specification
This document serves as a detailed design specification for the "Agent Teams" feature. It is intended to be used as a blueprint for implementation by an automated agent.
Core Concept
Agent Teams are specialized collections of sub-agents orchestrated by the
top-level Gemini CLI agent. Each team provides a set of tools (via its agents)
and a set of instructions (via TEAM.md) that guide the top-level agent on how
to delegate work effectively.
Architecture & Data Flow
1. Storage & Discovery
Teams are stored in .gemini/teams/. Each team is a directory containing:
TEAM.md: A Markdown file with YAML frontmatter for metadata (name,display_name,description) and a body containing orchestration instructions.agents/: A sub-directory containing standard agent definitions (.mdfiles) that comprise the team.
2. Core Components
TeamDefinition: The internal representation of a team, including its instructions and associatedAgentDefinitions.TeamLoader: Responsible for scanning the filesystem, parsingTEAM.md, and loading team agents.TeamRegistry: Central manager for all discovered teams and the active team session state.SubagentToolPrioritization: Logic in theToolRegistryorConfigto surface team-specific agents as preferred tools.
3. Orchestration
The top-level Gemini CLI agent is modified to be "team-aware":
- Its System Prompt is dynamically updated to include the active team's instructions.
- It is instructed to prioritize delegation to team agents for tasks matching the team's purpose.
4. User Experience
- Startup Selection: Users are prompted to select a team on launch if multiple teams are available and no default is set.
- Active Team Indicator: A clear visual status in the CLI showing the currently active team.
Execution Order
The implementation should follow this strict sequence to ensure a solid foundation before moving to UI:
- TASK-01: Core Types, Loader, and Registry.
- TASK-02: Integration into
Configand lifecycle management. - TASK-03: Prompt Engineering and Tool Prioritization logic.
- TASK-04: CLI Startup UX (Selection Dialog).
- TASK-05: CLI Main UI (Status Indicator) and Sample Team creation.