Move this formatting up to the agent.