gaia-enhanced-agent / test_enhanced_agent_with_multimodal.py
GAIA Agent Deployment
Deploy Complete Enhanced GAIA Agent with Phase 1-6 Improvements
9a6a4dc
#!/usr/bin/env python3
"""
Test Enhanced AGNO Agent with European Open-Source Multimodal Tools
"""
import os
import sys
import logging
from pathlib import Path
# Add the deployment-ready directory to the path
sys.path.insert(0, str(Path(__file__).parent))
# Set up logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
def test_agent_initialization():
"""Test that the enhanced agent initializes correctly with multimodal tools."""
print("πŸ§ͺ Testing Enhanced AGNO Agent with European Multimodal Tools...")
try:
from agents.enhanced_unified_agno_agent import GAIAAgent, get_agent_status
print("βœ… Successfully imported enhanced agent")
# Get agent status
status = get_agent_status()
print(f"πŸ“Š Agent Status: {status}")
# Check if multimodal tools are available
if status.get('multimodal_tools_available'):
print("βœ… European open-source multimodal tools are available")
multimodal_status = status.get('multimodal_status', {})
if multimodal_status:
print(f"πŸ‡ͺπŸ‡Ί Multimodal capabilities: {multimodal_status.get('capabilities', {})}")
print(f"πŸ”§ Multimodal models: {multimodal_status.get('models', {})}")
else:
print("⚠️ European open-source multimodal tools not available")
print(f"πŸ”§ Total tools available: {status.get('tools_count', 0)}")
return True
except Exception as e:
print(f"❌ Error testing agent: {e}")
import traceback
traceback.print_exc()
return False
def test_simple_question():
"""Test the agent with a simple question."""
print("\nπŸ§ͺ Testing simple question processing...")
try:
from agents.enhanced_unified_agno_agent import process_question
# Test with a simple mathematical question
question = "What is 15 * 23?"
print(f"❓ Question: {question}")
answer = process_question(question)
print(f"βœ… Answer: {answer}")
return True
except Exception as e:
print(f"❌ Error processing question: {e}")
import traceback
traceback.print_exc()
return False
def main():
"""Run all tests."""
print("πŸš€ Starting Enhanced AGNO Agent Tests with European Multimodal Tools")
print("=" * 70)
# Test 1: Agent initialization
test1_passed = test_agent_initialization()
# Test 2: Simple question processing
test2_passed = test_simple_question()
print("\n" + "=" * 70)
print("πŸ“Š Test Results:")
print(f" Agent Initialization: {'βœ… PASSED' if test1_passed else '❌ FAILED'}")
print(f" Simple Question: {'βœ… PASSED' if test2_passed else '❌ FAILED'}")
if test1_passed and test2_passed:
print("\nπŸŽ‰ All tests passed! Enhanced agent with European multimodal tools is working!")
return True
else:
print("\n⚠️ Some tests failed. Check the logs above for details.")
return False
if __name__ == "__main__":
success = main()
sys.exit(0 if success else 1)