Agent training now takes time and waits for the agent to finish their task