Serialize Agent tasks