FlowiseAI/Flowise · error · Error
Worker prompt is required!
Error message
Worker prompt is required!
What it means
Thrown by Worker.init immediately after the workerName check, when `workerPrompt` is falsy. The worker prompt is the system prompt fed to createAgent; without it the agent has no instructions.
Source
Thrown at packages/components/nodes/multiagents/Worker/Worker.ts:99
optional: true
}
]
}
async init(nodeData: INodeData, input: string, options: ICommonObject): Promise<any> {
let tools = nodeData.inputs?.tools
tools = flatten(tools)
let workerPrompt = nodeData.inputs?.workerPrompt as string
const workerLabel = nodeData.inputs?.workerName as string
const supervisor = nodeData.inputs?.supervisor as IMultiAgentNode
const maxIterations = nodeData.inputs?.maxIterations as string
const model = nodeData.inputs?.model as BaseChatModel
const promptValuesStr = nodeData.inputs?.promptValues
if (!workerLabel) throw new Error('Worker name is required!')
const workerName = workerLabel.toLowerCase().replace(/\s/g, '_').trim()
if (!workerPrompt) throw new Error('Worker prompt is required!')
let workerInputVariablesValues: ICommonObject = {}
if (promptValuesStr) {
try {
workerInputVariablesValues = typeof promptValuesStr === 'object' ? promptValuesStr : JSON.parse(promptValuesStr)
} catch (exception) {
throw new Error("Invalid JSON in the Worker's Prompt Input Values: " + exception)
}
}
workerInputVariablesValues = handleEscapeCharacters(workerInputVariablesValues, true)
const llm = model || (supervisor.llm as BaseChatModel)
const multiModalMessageContent = supervisor?.multiModalMessageContent || []
const abortControllerSignal = options.signal as AbortController
const workerInputVariables = getInputVariables(workerPrompt)
if (!workerInputVariables.every((element) => Object.keys(workerInputVariablesValues).includes(element))) {View on GitHub (pinned to abe4a8601a)
Solutions
- Fill in the workerPrompt field on the Worker node.
- Provide a sensible default prompt template in the node's input schema.
- Validate at flow-save time.
Defensive patterns
Strategy: validation
Validate before calling
const workerPrompt = (nodeData.inputs?.workerPrompt as string)?.trim()
if (!workerPrompt) throw new Error('Worker prompt is required!') Prevention
- Provide a default prompt template in the schema.
- Block empty prompts at flow-save time.
When it happens
Trigger: Worker node configured with a name but no prompt template; prompt field cleared accidentally; chatflow JSON missing the workerPrompt key.
Common situations: Quickly adding workers and forgetting the prompt; relying on a default that does not exist.
Related errors
- Worker name is required!
- Invalid JSON in the Worker's Prompt Input Values: ${exceptio
- Supervisor name is required!
- Worker input variables values are not provided!
- Returned message history must be an array
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/b36e61eb8e53936a.
Report an issue: GitHub.