Adapt to new AGM API