Serialize Agent tasks

this needs to be on line 60