My website is adaptive, rather than responsive in its construction, with different templates for different user agent classifications (mobile and desktop/tablet). We do this through strong user agent detection and serving the content back with the Vary: user-agent header (as per Google's guidelines)
I'd like to keep this structure when creating AMP pages - detecting the user based on their user agent and sending back an AMP template.
Is this possible, and if so, what is the user agent that AMP uses?
AMP user agents are just regular web browsers, so there really isn't a way to disambiguate them from all other web traffic. This is by design.
You can still implement an adaptive design based on AMP, where you use AMP to build the pages you deliver to a subset of users. E.g. you could use AMP only for your users on phones and respectively chose the AMP template for them.