Looking at the code for AGC in indicators.c, AGC has a convenient (but undocumented) behavior when Period == 0. The smoothing factor is set to 0.991, which matches several of Ehler's codes.
Code:
var AGC(var *Data, int Period) {
   var a = 0.991;
   if(Period) a = smoothF(Period);
   ...

In other cases, smoothing factor is smoothF(Period), which is an inline function that takes an integer.
Code:
inline var smoothF(int period) { return 2./(period+1); }


My feeling is that AGC and smoothF should not be a step function. I arrived at this opinion after observing that there is no way for smoothF to produce the default value AGC uses, 0.991, except via the magic Period=0. The first few values are
smoothF(0) = 2.
smoothF(1) = 1.
smoothF(2) = 0.66
smoothF(3) = 0.5
Output of 0.991 would correspond to Period =~ 1.018 if Period were allowed to be a continuous variable.

I guess, if that doesn't appeal to you, an alternative is that AGC should take a "smoothing factor" instead of a "Period". This is similar to my earlier suggestion about allowing EMA's alpha factor to be adjustable.