#!/usr/bin/env python3 """ Monitor the deployment after ChatMessage fix """ import time import requests def monitor_deployment(): """Monitor the deployment after the fix""" print("šŸ”§ MONITORING DEPLOYMENT AFTER CHATMESSAGE FIX") print("=" * 60) url = "https://huggingface.co/spaces/John-jero/IDAgentsFreshTest" for attempt in range(5): try: print(f"\nā±ļø Check #{attempt + 1} at {time.strftime('%H:%M:%S')}") response = requests.get(url, timeout=15) print(f"Status: {response.status_code}") print(f"Size: {len(response.text):,} bytes") # Check for success indicators text = response.text.lower() if response.status_code == 200: print("āœ… Status 200: Good!") # Look for app interface indicators if "agent builder" in text or "gradio" in text: print("šŸŽ‰ App interface detected!") elif "error" in text: print("āš ļø Error detected in response") elif "building" in text or "preparing" in text: print("šŸ”„ Still building...") else: print("šŸ“± Response received, checking content...") elif response.status_code == 401: print("šŸ” Status 401: Authentication page (app may be loading)") else: print(f"āŒ Unexpected status: {response.status_code}") # Show first 200 chars for context print(f"Preview: {response.text[:200]}...") if attempt < 4: print("ā³ Waiting 30 seconds...") time.sleep(30) except Exception as e: print(f"āŒ Request failed: {e}") if attempt < 4: time.sleep(30) print(f"\nšŸŽÆ FINAL RECOMMENDATION:") print(f"Visit: {url}") print("Look for:") print("• Agent Builder interface") print("• Landing/Builder/Chat tabs") print("• No import error messages") print("\nIf working, add API keys in Space settings:") print("• OPENAI_API_KEY") print("• SERPER_API_KEY") if __name__ == "__main__": monitor_deployment()