Added rest endpoint to agent, ugly...