Set up a user agent query

Closes #9.