split out all the agent messages into different functions