# Node 2: Analyze the sales dataanalyze = LLMNode( id="analyze_data", name="Analyze Sales Data", instruction=""" Analyze this sales data and provide: 1. **Total Revenue**: Sum of all sales 2. **Top Performers**: Top 3 salespeople by revenue 3. **Trends**: Week-over-week comparison 4. **Concerns**: Any red flags or areas needing attention Sales Data: {{read_sales}} Format your response with clear sections and bullet points. """, dependencies=["read_sales"], # This node depends on read_sales model="claude-sonnet-4-5-20250929", max_tokens=2000)wf.add_node(analyze)
Add another LLM node to create an executive summary:
# Node 3: Generate executive summarysummary = LLMNode( id="executive_summary", name="Executive Summary", instruction=""" Based on this analysis, create a brief executive summary (3-4 sentences) suitable for a busy executive. Focus on the most important insights and any actions needed. Analysis: {{analyze_data}} """, dependencies=["analyze_data"])wf.add_node(summary)
✅ Workflow validated!✅ Deployed! ID: wf_abc123xyz📊 Status: completed⏱️ Duration: 4.32s💰 Cost: $0.0023============================================================📈 ANALYSIS============================================================## Total Revenue$1,234,567 for the period## Top Performers1. Sarah Johnson - $245,0002. Mike Chen - $198,0003. Lisa Park - $187,000## Trends- 12% increase from last week- Strong performance in Enterprise segment## Concerns- SMB segment down 8%- Two reps below quota============================================================📋 EXECUTIVE SUMMARY============================================================Sales exceeded targets by 12% this week, driven by strong Enterprise performance from Sarah Johnson and Mike Chen. However, the SMB segment declined 8%, requiring immediate attention. Recommend a team meeting to address underperforming segments.