graph TD
A[Start SubAgent Selection] --> B{Select from 4 SubAgents}
B --> C[SubAgent 1: Niche Researcher]
B --> D[SubAgent 2: Keyword Analyzer]
B --> E[SubAgent 3: Product Curator]
B --> F[SubAgent 4: Final Aggregator]
C --> G[Query Live Sources]
G --> H[Process Niche Data]
H --> I[Generate Ranked List]
I --> J[Add Competition Notes]
J --> K[Output: 20 Ranked Niches]
D --> L[Input: Ranked Niche List]
L --> M[Generate Keywords]
M --> N[Find Long-tail Keywords]
N --> O[Add Search Metrics]
O --> P[Output: Keyword Sets]
E --> Q[Input: Niche List]
Q --> R[Search Products]
R --> S[Filter by Metrics]
S --> T[Select Top Products]
T --> U[Output: Product Lists]
F --> V[Collect All Data]
V --> W[Format Spreadsheet]
W --> X[Generate Summary]
X --> Y[Create Final Files]
Y --> Z[End Process]