FlowiseAI/Flowise · error · Error

Supervisor name is required!

Error message

Supervisor name is required!

What it means

Thrown by Supervisor.init() when nodeData.inputs.supervisorName is falsy. The supervisor label is lowercased and underscore-joined to form the routing agent's name in the multi-agent team, so an empty name breaks graph construction upstream.

Source

Thrown at packages/components/nodes/multiagents/Supervisor/Supervisor.ts:121

        ]
    }

    async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
        const llm = nodeData.inputs?.model as BaseChatModel
        const supervisorPrompt = nodeData.inputs?.supervisorPrompt as string
        const supervisorLabel = nodeData.inputs?.supervisorName as string
        const _recursionLimit = nodeData.inputs?.recursionLimit as string
        const recursionLimit = _recursionLimit ? parseFloat(_recursionLimit) : 100
        const moderations = (nodeData.inputs?.inputModeration as Moderation[]) ?? []
        const summarization = nodeData.inputs?.summarization as string

        const abortControllerSignal = options.signal as AbortController

        const workersNodes: IMultiAgentNode[] =
            nodeData.inputs?.workerNodes && nodeData.inputs?.workerNodes.length ? flatten(nodeData.inputs?.workerNodes) : []
        const workersNodeNames = workersNodes.map((node: IMultiAgentNode) => node.name)

        if (!supervisorLabel) throw new Error('Supervisor name is required!')

        const supervisorName = supervisorLabel.toLowerCase().replace(/\s/g, '_').trim()

        let multiModalMessageContent: MessageContentImageUrl[] = []

        async function createTeamSupervisor(llm: BaseChatModel, systemPrompt: string, members: string[]): Promise<Runnable> {
            const memberOptions = ['FINISH', ...members]

            systemPrompt = systemPrompt.replaceAll('{team_members}', members.join(', '))

            let userPrompt = `Given the conversation above, who should act next? Or should we FINISH? Select one of: ${memberOptions.join(
                ', '
            )}`

            const tool = new RouteTool({
                schema: z.object({
                    reasoning: z.string(),
                    next: z.enum(['FINISH', ...members]),

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Set a non-empty 'Supervisor Name' in the Supervisor node configuration (e.g. 'Router' or 'Team Lead').
  2. If using a variable reference, ensure it resolves to a non-empty string before the node runs.
  3. Re-import the chatflow from a known-good export that includes the field.

Example fix

// before
inputs: { supervisorName: '' }
// after
inputs: { supervisorName: 'Router' }
Defensive patterns

Strategy: validation

Validate before calling

function assertSupervisorName(name: unknown): asserts name is string {
  if (typeof name !== 'string' || !name.trim()) {
    throw new Error('Supervisor node requires a non-empty \'Supervisor Name\'')
  }
}

Type guard

function isNonEmptySupervisorName(v: unknown): v is string {
  return typeof v === 'string' && v.trim().length > 0
}

Try / catch

try {
  await supervisorNode.init(nodeData, _, options)
} catch (e) {
  if ((e as Error).message === 'Supervisor name is required!') {
    // set nodeData.inputs.supervisorName to a non-empty value and retry
  }
  throw e
}

Prevention

When it happens

Trigger: Deploying a Supervisor multiagent node without filling the 'Supervisor Name' input field, or passing an empty/whitespace string. Also when the chatflow import dropped the field.

Common situations: Newly added Supervisor node left with default empty name. Cloned chatflow where the name field was cleared. Variable reference resolving to empty.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/98e31babc790860b. Report an issue: GitHub.