· 8 min read
By the end of this guide, you will have a 4-agent report generation system that takes data inputs and a report template, collects and validates the data, performs analysis, writes the narrative sections, and produces a formatted final report. This system handles recurring reports -- weekly dashboards, monthly business reviews, quarterly board packages -- that consume analyst hours every cycle with repetitive work.
Recurring reports are the silent productivity killer in data-driven organizations. Every week or month, someone pulls the same metrics, runs the same comparisons, writes the same narrative structure, and formats the same document. The analysis is similar each cycle, but it still takes hours because the data changes and the narrative must reflect what is new. This agent team automates the mechanical parts of the cycle while preserving the analytical rigor and narrative quality that make reports useful.
You need Claude Code for initial setup and testing, and the Claude Agent SDK for recurring automated runs. You also need a report template (the structure of the report you want to automate), data sources (APIs, databases, CSV exports, or other structured data), and a clear understanding of who reads the report and what decisions it informs.
Before starting, document one complete cycle of the report you want to automate. Write down every step: where you pull data from, what calculations you perform, what comparisons you make to previous periods, what narrative sections you write, and what formatting you apply. This documentation becomes the specification for your agent team.
Mission: Manage the end-to-end report generation process. Receive the report request with the target period and parameters, orchestrate data collection and analysis, review intermediate outputs, ensure the final report matches the template and quality standards, and deliver the complete document.
The Coordinator is the project manager for each report cycle. It knows the template, the data requirements, the deadlines, and the quality bar. When the Data Collector reports that a data source is unavailable, the Coordinator decides whether to proceed with partial data (noting the gap) or delay the report. When the Analyst's numbers do not match what the Narrator describes, the Coordinator catches the discrepancy.
Prompt guidance: Give the Coordinator the full report template with annotations explaining what each section needs. "Section 3 compares current quarter revenue to the same quarter last year, not to the previous quarter. The narrative should explain the variance, not just state it." These annotations encode the institutional knowledge that makes the report valuable.
Mission: Gather all required data for the report period. Pull metrics from specified sources, validate data completeness and accuracy, perform required calculations (period-over-period comparisons, percentage changes, running averages), and produce a structured data package ready for analysis.
The Data Collector handles the most tedious part of report generation: pulling numbers, checking that they make sense, and preparing them for use. It validates that totals add up, that period boundaries are correct, that currency conversions are applied consistently, and that year-over-year comparisons use the same calculation methodology as previous reports.
Prompt guidance: Provide explicit data specifications for each metric: "Monthly Recurring Revenue (MRR) is calculated as the sum of all active subscription values as of the last day of the month. Include only paid subscriptions. Exclude free trials, internal test accounts, and accounts in a grace period. Source: billing system export." This level of specificity prevents the subtle calculation errors that undermine report credibility.
Mission: Perform the analytical work that turns raw data into insights. Calculate key metrics, run period-over-period comparisons, identify trends, detect anomalies, compute statistical summaries, and produce analytical findings with supporting evidence.
The Analytical Engine does the quantitative thinking. It does not just report that revenue grew 12% -- it determines whether that growth was driven by new customer acquisition, expansion within existing accounts, or reduced churn. It identifies which segments are outperforming and underperforming. It flags anomalies: a sudden spike in a metric, a breakdown in a historical correlation, or a trend reversal.
Prompt guidance: Specify the analytical framework for each report section. "For the retention analysis: calculate logo retention rate and net revenue retention rate. Segment by customer size (SMB, mid-market, enterprise) and by cohort (quarter of initial purchase). Compare each to the same period last year and to the trailing 4-quarter average. Flag any segment where retention dropped more than 2 percentage points."
Mission: Write the narrative sections of the report, transforming analytical findings into clear, contextual prose that explains what happened, why it matters, and what to do about it. Match the tone and style of previous reports for consistency.
The Narrator writes like a senior analyst, not a data summarizer. It does not say "Revenue was $4.2M, which is 12% higher than last quarter." It says "Revenue reached $4.2M, accelerating to 12% quarter-over-quarter growth from 8% in Q3. The acceleration was driven by a 40% increase in mid-market deal volume following the launch of the team tier in September. This suggests the new pricing structure is resonating with the target segment and supports the planned investment in mid-market sales capacity."
Prompt guidance: Provide 2-3 examples of narrative sections from previous reports that represent the desired tone, depth, and style. Specify the audience: "This report is read by the CEO, CFO, and board of directors. They are familiar with the business metrics and want insight, not education. Lead with what changed and why, not with definitions or background." Also specify what to emphasize: "Always lead each section with the most important finding, not the most obvious metric."
Report generation is sequential with one parallel phase:
Report generation prompts need to encode the specific logic of your report, not just general analytical capabilities.
For the Data Collector: "You are a data operations specialist responsible for assembling the monthly business review data package. For each metric listed below, pull the value for the specified period, calculate the period-over-period change (month-over-month and year-over-year), and validate against the following sanity checks: [list checks]. Report any validation failures immediately rather than including potentially incorrect data. Output the data package as a structured table with columns: Metric, Current Period Value, Prior Period Value, MoM Change, YoY Change, Validation Status."
For the Analytical Engine: "You are a business analyst producing the analytical layer of a recurring report. You will receive a validated data package. For each report section, perform the specified analysis and produce findings. Each finding must include: (1) the observation (what the data shows), (2) the context (how this compares to benchmarks, trends, and expectations), (3) the significance (why this matters for the business), (4) the confidence level (high if the data is robust and the pattern is clear, medium if the data has gaps or the pattern is emerging, low if the finding is preliminary)."
For the Report Narrator: "You are a senior business analyst writing the narrative sections of a monthly business review. You will receive analytical findings for each section. Write in the style of the example reports provided. Rules: (1) Lead each section with the most important insight, not the most obvious metric. (2) Explain causes, not just outcomes -- 'revenue grew because...' not just 'revenue grew.' (3) Connect findings across sections -- if churn increased and support tickets spiked, note the connection. (4) Every section must end with an implication or recommended action. (5) Keep each section to 150-250 words. Executives skim -- density beats length."
For production use, set up the Agent SDK to trigger the report generation automatically:
A monthly business review generated by this team includes:
Executive Summary: Q1 2026 closed at $14.8M ARR, up 34% year-over-year, driven by record mid-market acquisition (47 new logos, up from 29 in Q1 2025). Net revenue retention held steady at 112%. The primary concern is a 3-point increase in SMB churn (now 8.1% monthly), concentrated in accounts acquired through the January promotional campaign, suggesting acquisition quality issues in that cohort.
Revenue Analysis (sample narrative): Monthly recurring revenue reached $1.23M in March, the third consecutive month of acceleration. The growth driver shifted from expansion revenue in Q4 to new logo acquisition in Q1, with 18 new mid-market accounts closed in March alone. This is notable because mid-market accounts carry an average first-year value of $28K compared to $6K for SMB, meaning the current acquisition mix will compound favorably into Q2 expansion revenue. However, the March pipeline shows a 15% decrease in mid-market opportunities, suggesting the Q1 pace may not sustain without additional investment in top-of-funnel activity.
Data Quality Note: The support ticket data for February 12-14 is incomplete due to a system migration. Metrics that depend on support ticket volume (including the churn correlation analysis) should be interpreted with this gap in mind.
Progressive automation. Start by automating the data collection and calculation steps while keeping narrative writing manual. Once you trust the data pipeline, add the Analytical Engine. Finally, add the Narrator. This staged approach builds confidence incrementally.
Variance commentary automation. The highest-value narrative in recurring reports is explaining variances -- why a number is higher or lower than expected. Train the Narrator specifically on variance commentary by providing examples of good variance explanations from past reports.
Multi-audience versions. Generate the same report in different formats for different audiences. The board gets a 2-page summary with strategic implications. The leadership team gets a 5-page report with operational detail. The department heads get section-specific deep dives. One data collection and analysis run feeds multiple output versions.
Audit trail. Have each agent log its intermediate outputs and decision rationale. When someone questions a number in the report six months later, you can trace it back through the Narrator's source finding, the Analyst's calculation, and the Collector's raw data pull.