add query options to agent