{"record":{"id":"7808eaf2704e8abd","repo":"FlowiseAI/Flowise","slug":"agent-input-variables-values-are-not-provided","errorCode":null,"errorMessage":"Agent input variables values are not provided!","messagePattern":"Agent input variables values are not provided!","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/sequentialagents/Agent/Agent.ts","lineNumber":504,"sourceCode":"        if (promptValuesStr) {\n            try {\n                agentInputVariablesValues = typeof promptValuesStr === 'object' ? promptValuesStr : JSON.parse(promptValuesStr)\n            } catch (exception) {\n                throw new Error(\"Invalid JSON in the Agent's Prompt Input Values: \" + exception)\n            }\n        }\n        agentInputVariablesValues = handleEscapeCharacters(agentInputVariablesValues, true)\n\n        const startLLM = sequentialNodes[0].startLLM\n        const llm = model || startLLM\n        if (nodeData.inputs) nodeData.inputs.model = llm\n\n        const multiModalMessageContent = sequentialNodes[0]?.multiModalMessageContent || (await processImageMessage(llm, nodeData, options))\n        const abortControllerSignal = options.signal as AbortController\n        const agentInputVariables = uniq([...getInputVariables(agentSystemPrompt), ...getInputVariables(agentHumanPrompt)])\n\n        if (!agentInputVariables.every((element) => Object.keys(agentInputVariablesValues).includes(element))) {\n            throw new Error('Agent input variables values are not provided!')\n        }\n\n        const interrupt = nodeData.inputs?.interrupt as boolean\n\n        const toolName = `tool_${nodeData.id}`\n        const toolNode = new ToolNode(tools, nodeData, input, options, toolName, [], { sequentialNodeName: toolName })\n\n        ;(toolNode as any).seekPermissionMessage = async (usedTools: IUsedTool[]) => {\n            const prompt = ChatPromptTemplate.fromMessages([['human', approvalPrompt || defaultApprovalPrompt]])\n            const chain = prompt.pipe(startLLM)\n            const response = (await chain.invoke({\n                input: 'Hello there!',\n                tools: JSON.stringify(usedTools)\n            })) as AIMessageChunk\n            return response.content\n        }\n\n        const workerNode = async (state: ISeqAgentsState, config: RunnableConfig) => {","sourceCodeStart":486,"sourceCodeEnd":522,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/sequentialagents/Agent/Agent.ts#L486-L522","documentation":"After merging template variables from the system and human prompts via `getInputVariables`, the code requires every `{var}` placeholder to have a matching key in `agentInputVariablesValues`. `agentInputVariables.every(...)` rejects the run if even one template variable has no supplied value, because LangChain's prompt template would otherwise throw a less helpful KeyError downstream.","triggerScenarios":"The system or human prompt contains a placeholder like `{customerName}` but `nodeData.inputs.promptValues` (or `$flow`/`$vars` resolution) does not include a `customerName` key. Also triggered by a typo mismatch between the placeholder name and the supplied key.","commonSituations":"Renamed a placeholder in the prompt but did not update promptValues; case mismatch (`{CustomerName}` vs `customerName`); referenced a `$flow.session.x` path that resolved to undefined so the key was never set; copy-pasted a prompt from another flow with different variables.","solutions":["Open the Agent's system and human prompts, list every `{variable}` token, and add a matching key to Prompt Input Values for each.","Use the Flowise variable picker (`$flow`, `$vars`, `$chatId`...) so values auto-populate instead of typing them manually.","Remove orphan template variables from the prompt that you no longer intend to fill.","Match casing exactly — placeholders are case-sensitive."],"exampleFix":"// before\nsystemMessagePrompt = \"Hello {customerName}, your order {orderId} is ready.\"\nnodeData.inputs.promptValues = '{\"customerName\":\"Alice\"}' // missing orderId -> throws [282]\n\n// after\nnodeData.inputs.promptValues = '{\"customerName\":\"Alice\",\"orderId\":\"#42\"}'","handlingStrategy":"validation","validationCode":"function validatePromptVariables(systemPrompt, humanPrompt, values) {\n  const required = [...new Set([...getInputVariables(systemPrompt), ...getInputVariables(humanPrompt)])]\n  const missing = required.filter((v) => !Object.prototype.hasOwnProperty.call(values, v))\n  if (missing.length) {\n    throw new Error(`Missing values for prompt variables: ${missing.join(', ')}`)\n  }\n  return required\n}\n\nvalidatePromptVariables(systemMessagePrompt, humanMessagePrompt, agentInputVariablesValues)","typeGuard":"function hasAllVariables(template: string, values: Record<string, unknown>): boolean {\n  return getInputVariables(template).every((v) => Object.keys(values).includes(v))\n}","tryCatchPattern":null,"preventionTips":["Use the Flowise variable picker for `$flow`/`$vars` references so keys auto-populate.","Match casing exactly between placeholders and promptValues keys.","When renaming a placeholder, update promptValues in the same edit."],"tags":["prompts","templates","input-validation","configuration"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}