[Fix #166] Add support for ag