# agent_utils.py def choose_agent(agent_type, available_agents): """ Selects the appropriate agent based on the agent_type parameter. Args: agent_type (str): A string identifier for the agent. Known types are 'contractor_agent' and 'home_owner_agent'. available_agents (dict): Dictionary of available agents. Returns: object: The selected agent object. Defaults to contractor_agent if no match is found. """ return available_agents.get(agent_type, available_agents['contractor_agent']) # default to contractor_agent if no match