move get_agent_device to dao