Changing the agent script to work with the dashboard