{"record":{"id":"f1bfc7c310be58d4","repo":"FlowiseAI/Flowise","slug":"worker-input-variables-values-are-not-provided","errorCode":null,"errorMessage":"Worker input variables values are not provided!","messagePattern":"Worker input variables values are not provided!","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/multiagents/Worker/Worker.ts","lineNumber":118,"sourceCode":"\n        let workerInputVariablesValues: ICommonObject = {}\n        if (promptValuesStr) {\n            try {\n                workerInputVariablesValues = typeof promptValuesStr === 'object' ? promptValuesStr : JSON.parse(promptValuesStr)\n            } catch (exception) {\n                throw new Error(\"Invalid JSON in the Worker's Prompt Input Values: \" + exception)\n            }\n        }\n        workerInputVariablesValues = handleEscapeCharacters(workerInputVariablesValues, true)\n\n        const llm = model || (supervisor.llm as BaseChatModel)\n        const multiModalMessageContent = supervisor?.multiModalMessageContent || []\n\n        const abortControllerSignal = options.signal as AbortController\n        const workerInputVariables = getInputVariables(workerPrompt)\n\n        if (!workerInputVariables.every((element) => Object.keys(workerInputVariablesValues).includes(element))) {\n            throw new Error('Worker input variables values are not provided!')\n        }\n\n        const agent = await createAgent(\n            llm,\n            [...tools],\n            workerPrompt,\n            multiModalMessageContent,\n            workerInputVariablesValues,\n            maxIterations,\n            {\n                sessionId: options.sessionId,\n                chatId: options.chatId,\n                input\n            }\n        )\n\n        const workerNode = async (state: ITeamState, config: RunnableConfig) =>\n            await agentNode(","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/multiagents/Worker/Worker.ts#L100-L136","documentation":"Thrown after computing `workerInputVariables = getInputVariables(workerPrompt)` — the set of placeholders found in the prompt template. The check verifies every placeholder has a corresponding key in workerInputVariablesValues; if any are missing, the prompt cannot be fully rendered and the worker cannot run.","triggerScenarios":"Prompt template contains `{foo}` and `{bar}` but promptValues only provides `foo`; placeholder name typo between template and values; template was edited to add a new variable without updating values.","commonSituations":"Iterating on a worker prompt and adding new placeholders; renaming variables in the template but not in the JSON values; case-sensitivity mismatches.","solutions":["Inspect `workerInputVariables` (log it) and add every missing key to promptValues.","Ensure spelling and case of placeholder names match exactly between template `{Name}` and promptValues key `Name`.","Remove unused placeholders from the template.","Optionally make unused variables fall back to empty strings instead of throwing."],"exampleFix":"// before\nif (!workerInputVariables.every((element) => Object.keys(workerInputVariablesValues).includes(element))) {\n  throw new Error('Worker input variables values are not provided!')\n}\n// after\nconst missing = workerInputVariables.filter((v) => !Object.keys(workerInputVariablesValues).includes(v))\nif (missing.length) {\n  throw new Error(`Worker prompt is missing values for: ${missing.join(', ')}`)\n}","handlingStrategy":"validation","validationCode":"const required = getInputVariables(workerPrompt)\nconst provided = Object.keys(workerInputVariablesValues)\nconst missing = required.filter((v) => !provided.includes(v))\nif (missing.length) throw new Error(`Worker prompt missing values for: ${missing.join(', ')}`)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep placeholder names consistent between template and values.","Log getInputVariables output while iterating on prompts.","Treat placeholder names as case-sensitive."],"tags":["validation","prompt-template","multiagent","variables"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}