The whole transformation starts with applying a matrix to ‘inset’ and rotate the primaries, if I understood that correctly, but that matrix is fixed in the implementation, you don’t get sigmoid’s detailed controls. At the end, there’s another matrix to ‘outset’ the result.
After insetting, it converts the image into log space, that is common in filmic, sigmoid and AgX, as far as I understand. AgX uses a fixed dynamic range (about -12.5 - +4 EV, or about -10 EV below and 6.5 EV above 18% middle grey), so you’d have to use darktable’s exposure and tone EQ to fit the data into that.
After the log, a sigmoidal tone mapping function is applied, which is approximated here using a polynomial (not my work, any of this).
That is followed by applying the ‘look’ params (slope, power, saturation). In the original AgX, those were selectable per channel, allowing altering colour tones (e.g. there’s a ‘golden’ look), but I think darktable provides enough colour grading tools already, and it would have made the UI more cluttered, so I just set them all to the same values.
The slope is a multiplier (but we’re in log space), the power is used as an exponent:
out = (in * slope) ^ power
In the original AgX, there were also per-channel offset params. Maybe it would make sense to re-add the offset (as a single value); that would act on the shadows/blacks.
As a finally step of the ‘look’, the saturation is adjusted.
After that, we have the ‘outset’ matrix (which was strange to me, because the inset matrix was applied to linear data).
After the outset matrix, a fixed gamma of 2.2 is applied ‘to linearise’ the data.
Edit: I’ve added the offset slider to the branch.