try to start agent only if the function exists