protected static function modifyConfig($name, array $config, $override = false)
    {
        self::validateAgentName($name);
        if (!isset(self::$agentsConfig[$name])) {
            self::$agentsConfig[$name] = [];
        }
        $target = &self::$agentsConfig[$name];
        if ($override) {
            $target = $config;
        } else {
            $target = array_merge($target, $config);
        }
        if (self::hasAgent($name)) {
            self::getAgent($name)->config($target);
        }
    }