#!/usr/bin/env python3 """ Monitor Original ID Agents App Deployment Check if the full agent builder system is working """ import requests import time from datetime import datetime def monitor_original_app(): """Monitor the original ID Agents app deployment""" print("šŸ” MONITORING ORIGINAL ID AGENTS APP") print("=" * 60) print(f"URL: https://huggingface.co/spaces/John-jero/IDAgentsFreshTest") print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}") print("Checking if your original agent builder app is working...") print("-" * 60) for check in range(3): print(f"\nšŸ” Check {check + 1}/3:") try: response = requests.get( "https://huggingface.co/spaces/John-jero/IDAgentsFreshTest", timeout=15 ) print(f"āœ… Status Code: {response.status_code}") print(f"āœ… Response Size: {len(response.text)} bytes") # Check for specific indicators of your original app text = response.text.lower() # Look for signs of the original agent builder if "agent builder" in text or "create custom" in text: print("šŸŽ‰ SUCCESS: Original ID Agents app is working!") print("āœ… Agent builder interface detected") break elif "id agents" in text and ("medical" in text or "ai" in text): print("šŸ“± PARTIAL: ID Agents interface detected") print("šŸ”„ May still be loading agent builder features") elif "building" in text or "preparing" in text: print("šŸ”„ BUILDING: Space is still building") elif "error" in text or "failed" in text: print("āŒ ERROR: App showing error page") print("šŸ’” May need to check logs or simplify deployment") else: print("ā“ UNKNOWN: Checking for specific content...") # Look for more specific signs if "gradio" in text: print("šŸ“± Gradio interface detected") if "openai" in text or "api" in text: print("šŸ”‘ API integration references found") if "consultation" in text or "medical" in text: print("🩺 Medical functionality detected") except requests.exceptions.Timeout: print("ā±ļø TIMEOUT: Space taking longer than 15 seconds to respond") except Exception as e: print(f"āŒ ERROR: {e}") if check < 2: # Don't wait after last check print("ā³ Waiting 60 seconds before next check...") time.sleep(60) print(f"\nšŸŽÆ NEXT STEPS:") print("1. Visit the URL manually to see the interface") print("2. Check if you see the agent builder tabs/sections") print("3. Look for any error messages in the interface") print("4. If errors, we may need to simplify the deployment further") print("5. Add API keys once the interface is stable") print(f"\nšŸ“‹ TROUBLESHOOTING IF NEEDED:") print("• If still showing errors → simplify complex imports") print("• If agent builder missing → check core modules loaded") print("• If interface broken → revert to simpler UI") print("• If API errors → add OpenAI key in Space secrets") if __name__ == "__main__": monitor_original_app()