-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
33 lines (26 loc) · 900 Bytes
/
example.py
File metadata and controls
33 lines (26 loc) · 900 Bytes
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
"""Example usage of the Research Agent"""
from src.agent.research_agent import ResearchAgent
def main():
"""Example: Research a topic"""
# Initialize the agent
agent = ResearchAgent()
# Conduct research
topic = "Impact of artificial intelligence on healthcare"
print(f"Researching: {topic}\n")
result = agent.research(
topic=topic,
depth="medium", # Options: shallow, medium, deep
save_report=True
)
# Display results
print("\n" + "="*60)
print("RESEARCH COMPLETE")
print("="*60)
print(f"\nTopic: {result['topic']}")
print(f"Sources analyzed: {result['num_sources']}")
print(f"Report saved to: {result.get('report_path', 'Not saved')}")
print("\nReport Preview:")
print("-" * 60)
print(result['report'][:500] + "...") # Show first 500 chars
if __name__ == "__main__":
main()