Skip to content

Latest commit

 

History

History
110 lines (85 loc) · 2.8 KB

File metadata and controls

110 lines (85 loc) · 2.8 KB

Ready to Download! ✅

What's Changed

Dataset swapped: TheLook → Hosted App Usage
Schema updated: 27 tables
Training data updated: 434 Q-SQL pairs
Agent routing updated: "hosted-app-usage:" prefix
Tasks updated: User engagement & question volume
ALL alert features preserved: Hours, thresholds, anomaly detection

Files to Download

Must Have:

  1. main.py - Updated with hosted-app-usage agent
  2. schema.json - 27 tables from your hosted app
  3. training_data.csv - 434 Q-SQL pairs
  4. tasks.yaml - Production config (hourly/daily/weekly)
  5. tasks_test.yaml - Test config (5-10 seconds)
  6. README.md - Complete documentation
  7. requirements.txt - Python dependencies

Optional:

  1. extract_schema.py - Schema extractor (if you need to re-extract)
  2. setup_check.py - Setup verification
  3. MIGRATION_SUMMARY.md - What changed summary

Delete from Local:

curiosity_agent.py - Replaced by main.py
❌ Old training data CSVs - Replaced

Quick Start

# 1. Download all files above

# 2. In your terminal:
cd curiosity_agent
source venv/bin/activate

# 3. For testing (5-10 second intervals):
cp tasks_test.yaml tasks.yaml

# 4. Run it:
python main.py

What You'll See

📋 [STRUCTURED: USER_ENGAGEMENT] hosted-app-usage: What is user engagement...
   🔍 Calling Vanna API...
   
============================================================
✅ VANNA RESULT [STRUCTURED: user_engagement]
Question: What is user engagement for the hosted app...
Result:
[Vanna's response about user engagement metrics]
============================================================

🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔
📢 ALERT: USER_ENGAGEMENT
Type: structured
Reason: 🚨 ANOMALY DETECTED (HIGH): Engagement dropped 15%...
🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔🔔

Environment Variables

Configure in your .env file (copy from .env.example):

OPENAI_API_KEY=your-openai-api-key-here
VANNA_API_KEY=your-vanna-api-key-here
VANNA_USER_EMAIL=your-email@example.com
VANNA_AGENT_ID=hosted-app-usage

Verification

Run this to verify setup:

python setup_check.py

Should show:

✅ BigQuery schema: schema.json
✅ Training data CSV: training_data.csv
✅ Environment variable: OPENAI_API_KEY
✅ Main monitoring agent: main.py

Support

Everything is documented in README.md including:

  • Configuration guide
  • Alert modes
  • Threshold types
  • Troubleshooting
  • Examples

Next Steps

  1. Test with tasks_test.yaml (5-10 sec intervals)
  2. Verify Vanna responses look correct
  3. Check alerts are triggering properly
  4. Switch to tasks.yaml for production (hourly/daily)
  5. Later: Add Slack integration for alerts

🚀 Ready to go!