To get an agent catalog we first must enable access to the /puppet/v4/catalog endpoint. For that you need to change the rule puppetlabs v4 catalog for services from file /etc/puppetlabs/puppetserver/conf.d/auth.conf. Replace deny: "*" with allow-unauthenticated: true.