agent query definition
merge agent and event definitions