#!/usr/bin/env python3
import requests
import json

agent_id = "agent-35039b24-fbb9-4139-b036-4a04e9c3d6ac"
url = f"http://localhost:8283/v1/agents/{agent_id}/messages"

message = {
    "messages": [{
        "role": "user",
        "content": """Aiva, this is Claude Desktop checking in. 

Kinan asked me to continue the jobs at hand. What should I work on?

Current context:
- All infrastructure operational
- You are fully configured as Genesis Prime  
- Claude Code completed your configuration and testing
- I have browser automation, research, and coordination capabilities available

What is my next priority task?"""
    }]
}

try:
    response = requests.post(url, json=message)
    response.raise_for_status()
    result = response.json()
    
    # Extract the assistant's message
    if 'messages' in result and len(result['messages']) > 0:
        for msg in result['messages']:
            if msg.get('role') == 'assistant':
                print("\n" + "="*60)
                print("AIVA'S RESPONSE:")
                print("="*60)
                print(msg.get('content', ''))
                print("="*60 + "\n")
    else:
        print(json.dumps(result, indent=2))
        
except Exception as e:
    print(f"Error communicating with Aiva: {e}")
