from .stock import StockAgent from .music import MusicAgent AGENT_REGISTRY = {} def init_agents(): AGENT_REGISTRY["stock"] = StockAgent() AGENT_REGISTRY["music"] = MusicAgent() def get_agent(agent_id: str): return AGENT_REGISTRY.get(agent_id) def get_all_agent_states() -> list: return [ {"agent_id": aid, "state": agent.state, "detail": agent.state_detail} for aid, agent in AGENT_REGISTRY.items() ]