-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathruntime.py
More file actions
30 lines (23 loc) · 1 KB
/
Copy pathruntime.py
File metadata and controls
30 lines (23 loc) · 1 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
"""
Traffic simulation runtime configuration module.
This module handles the setup of the agent runtime environment for the traffic simulation.
It provides a clean interface for initializing the runtime with necessary agent types.
"""
from autogen_core import SingleThreadedAgentRuntime
from traffic_agents import VehicleAssistant, TrafficLightAssistant, PedestrianCrossingAssistant, MyAssistant
async def setup_runtime():
"""
Initialize and setup the agent runtime for the traffic simulation.
Returns:
tuple: A tuple containing (runtime, None, None, None) where:
- runtime: The initialized SingleThreadedAgentRuntime
- The other None values are placeholders for backward compatibility
"""
runtime = SingleThreadedAgentRuntime()
# Register the base assistant for core messaging functionality
await MyAssistant.register(
runtime,
"my_assistant",
lambda: MyAssistant("my_assistant")
)
return runtime, None, None, None