Aniruddha7/QueryLens-Text2SQL_DocVQA-V2
0
1import asyncio2import os3import sys4# Ensure Agent package path is importable5sys.path.insert(0, r"e:/Capstone_Project/text2sql-agent-mcp/Agent")6import backups.agentic_workflow4 as aw7 8async def run_one():9 # Initialize DB (use the module's configured DB_CONNECTION_URL when available)10 db_uri = os.environ.get('DB_CONNECTION_URL') or getattr(aw, 'DB_CONNECTION_URL', None)11 await aw.initialize_database(db_uri)12 # Run a single question13 # Prefix with 're-execute' to force regeneration and bypass any cached error in memory14 res = await aw.agentic_query_process('re-execute Who are the top 10 highest-paid employees?')15 print('\n--- AGENT OUTPUT START ---')16 print(res)17 print('--- AGENT OUTPUT END ---')18 19if __name__ == '__main__':20 asyncio.run(run_one())21 