discovery mechanism of agents

- check if jade service is available to avoid null pointer