Improve AGI result parsing