Moved agent control to AgentService.