-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhealth_monitoring_system.py
More file actions
42 lines (33 loc) · 1.27 KB
/
health_monitoring_system.py
File metadata and controls
42 lines (33 loc) · 1.27 KB
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
37
38
39
40
41
42
from uagents import Bureau
import os
from dotenv import load_dotenv
load_dotenv()
# Set environment variables
os.environ["GEMINI_API_KEY"] = os.getenv("GEMINI_API_KEY")
os.environ["TELEGRAM_BOT_TOKEN"] = os.getenv("TELEGRAM_BOT_TOKEN")
os.environ["USER_CHAT_ID"] = os.getenv("USER_CHAT_ID")
os.environ["EMERGENCY_CONTACT_CHAT_ID"] = os.getenv("EMERGENCY_CONTACT_CHAT_ID")
os.environ["GOOGLE_MAPS_API_KEY"] = os.getenv("GOOGLE_MAPS_API_KEY")
# Create and configure Bureau
bureau = Bureau(
port=8000,
endpoint="http://localhost:8000/submit"
)
from collector_agent import collector_agent
from analyzer_agent import analyzer_agent
from decision_maker import decision_maker
from locator_agent import locator_agent
# Add agents to bureau
bureau.add(collector_agent)
bureau.add(analyzer_agent)
bureau.add(decision_maker)
bureau.add(locator_agent)
os.environ['ANALYZER_ADDRESS'] = analyzer_agent.address
os.environ['COLLECTOR_ADDRESS'] = collector_agent.address
os.environ['DECISION_MAKER_ADDRESS'] = decision_maker.address
os.environ['LOCATOR_ADDRESS'] = locator_agent.address
print(f"Analyzer address: {analyzer_agent.address}")
print(f"Decision maker address: {decision_maker.address}")
print(f"Collector address: {collector_agent.address}")
if __name__ == "__main__":
bureau.run()