FlowiseAI/Flowise · error · Error

Agent input variables values are not provided!

Error message

Agent input variables values are not provided!

What it means

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.

Source

Thrown at packages/components/nodes/sequentialagents/Agent/Agent.ts:504

        if (promptValuesStr) {
            try {
                agentInputVariablesValues = typeof promptValuesStr === 'object' ? promptValuesStr : JSON.parse(promptValuesStr)
            } catch (exception) {
                throw new Error("Invalid JSON in the Agent's Prompt Input Values: " + exception)
            }
        }
        agentInputVariablesValues = handleEscapeCharacters(agentInputVariablesValues, true)

        const startLLM = sequentialNodes[0].startLLM
        const llm = model || startLLM
        if (nodeData.inputs) nodeData.inputs.model = llm

        const multiModalMessageContent = sequentialNodes[0]?.multiModalMessageContent || (await processImageMessage(llm, nodeData, options))
        const abortControllerSignal = options.signal as AbortController
        const agentInputVariables = uniq([...getInputVariables(agentSystemPrompt), ...getInputVariables(agentHumanPrompt)])

        if (!agentInputVariables.every((element) => Object.keys(agentInputVariablesValues).includes(element))) {
            throw new Error('Agent input variables values are not provided!')
        }

        const interrupt = nodeData.inputs?.interrupt as boolean

        const toolName = `tool_${nodeData.id}`
        const toolNode = new ToolNode(tools, nodeData, input, options, toolName, [], { sequentialNodeName: toolName })

        ;(toolNode as any).seekPermissionMessage = async (usedTools: IUsedTool[]) => {
            const prompt = ChatPromptTemplate.fromMessages([['human', approvalPrompt || defaultApprovalPrompt]])
            const chain = prompt.pipe(startLLM)
            const response = (await chain.invoke({
                input: 'Hello there!',
                tools: JSON.stringify(usedTools)
            })) as AIMessageChunk
            return response.content
        }

        const workerNode = async (state: ISeqAgentsState, config: RunnableConfig) => {

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Open the Agent's system and human prompts, list every `{variable}` token, and add a matching key to Prompt Input Values for each.
  2. Use the Flowise variable picker (`$flow`, `$vars`, `$chatId`...) so values auto-populate instead of typing them manually.
  3. Remove orphan template variables from the prompt that you no longer intend to fill.
  4. Match casing exactly — placeholders are case-sensitive.

Example fix

// before
systemMessagePrompt = "Hello {customerName}, your order {orderId} is ready."
nodeData.inputs.promptValues = '{"customerName":"Alice"}' // missing orderId -> throws [282]

// after
nodeData.inputs.promptValues = '{"customerName":"Alice","orderId":"#42"}'
Defensive patterns

Strategy: validation

Validate before calling

function validatePromptVariables(systemPrompt, humanPrompt, values) {
  const required = [...new Set([...getInputVariables(systemPrompt), ...getInputVariables(humanPrompt)])]
  const missing = required.filter((v) => !Object.prototype.hasOwnProperty.call(values, v))
  if (missing.length) {
    throw new Error(`Missing values for prompt variables: ${missing.join(', ')}`)
  }
  return required
}

validatePromptVariables(systemMessagePrompt, humanMessagePrompt, agentInputVariablesValues)

Type guard

function hasAllVariables(template: string, values: Record<string, unknown>): boolean {
  return getInputVariables(template).every((v) => Object.keys(values).includes(v))
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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