graph TD
A[CSVGeneratorAgent Start] --> B[Receive Input]
B --> C[Input: daily_metrics.json]
B --> D[Input: Formatting Instructions]
C --> E[Parse JSON Data]
D --> E
E --> F[Extract Metrics]
F --> G1[Date]
F --> G2[Country]
F --> G3[Clicks]
F --> G4[Conversions]
F --> G5[Cost]
G1 --> H[Calculate Conversion Rate]
G2 --> H
G3 --> H
G4 --> H
G5 --> H
H --> I[Format CSV Structure]
I --> J[Create CSV Headers]
I --> K[Generate Data Rows]
J --> L[Compile Final CSV]
K --> L
L --> M[Output TrafficSummary.csv]
M --> N[CSVGeneratorAgent End]