| """Run the research workflow agent.""" |
|
|
| import time |
| from agent_workflow import agent |
|
|
| print("=== Starting research workflow agent ===") |
| print(f"Started at: {time.strftime('%Y-%m-%d %H:%M:%S')}") |
| print() |
|
|
| start_time = time.time() |
|
|
| result = agent.invoke({ |
| 'messages': [], |
| 'step': 0, |
| 'research_data': "" |
| }) |
|
|
| end_time = time.time() |
|
|
| print(f"\n=== Research completed in {end_time - start_time:.2f} seconds ===") |
|
|
| import os |
| if os.path.exists('final_report.md'): |
| print("\n=== FINAL REPORT FOUND ===") |
| with open('final_report.md', 'r', encoding='utf-8') as f: |
| report_content = f.read() |
| print(f"Report length: {len(report_content)} characters") |
| print("\n--- REPORT CONTENT ---\n") |
| print(report_content) |
| else: |
| print("\n⚠️ No final_report.md generated") |