File size: 1,226 Bytes
8ed954c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import asyncio
from src.agent import app

async def main():
    print("πŸš€ Triggering the Advanced Agent Pipeline (USA)...")
    
    # We pass the state to the compiled StateGraph
    result = await app.ainvoke({"region": "USA", "retry_count": 0, "ticker": "NONE"})
    
    print("\n" + "="*50)
    print("πŸ“ˆ PIPELINE RESULTS")
    print("="*50)
    
    ticker = result.get('ticker', 'NONE')
    status = result.get('status', 'FAIL')
    verdict = result.get('final_verdict', 'No Verdict')
    
    print(f"🎯 Target Acquired: {ticker}")
    print(f"βš–οΈ Gatekeeper Status: {status}")
    
    if status == 'PASS':
        info = result.get('financial_data', {})
        print(f"πŸ’° Price: ${info.get('currentPrice')}")
        print(f"πŸ“Š Market Cap: ${info.get('marketCap', 0):,.0f}")
        print(f"🌊 Float Shares: {info.get('floatShares', 0):,.0f}")
        print(f"πŸ‘” Insider Ownership: {info.get('heldPercentInsiders', 0) * 100:.1f}%")
        print("\n🧠 SENIOR BROKER ANALYSIS:")
        print(verdict)
    else:
        print(f"πŸ›‘ Reason for failure: {result.get('financial_data', {}).get('reason', 'N/A')}")
        
    print("="*50 + "\n")

if __name__ == "__main__":
    asyncio.run(main())