Agent class now derived from Json