added agents service; agents can now be closed