FlowiseAI/Flowise · error · Error

Condition Agent input variables values are not provided!

Error message

Condition Agent input variables values are not provided!

What it means

ConditionAgent analog of error 282. Template variables from the agent and human prompts are collected via `getInputVariables`, and each must have a matching key in `conditionAgentInputVariablesValues`. The `.every(...)` check rejects the run if any placeholder lacks a supplied value.

Source

Thrown at packages/components/nodes/sequentialagents/ConditionAgent/ConditionAgent.ts:424

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

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

        const conditionAgentInputVariables = uniq([...getInputVariables(agentPrompt), ...getInputVariables(humanPrompt)])

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

        const abortControllerSignal = options.signal as AbortController

        const conditionalEdge = async (state: ISeqAgentsState, config: RunnableConfig) =>
            await runCondition(
                conditionName,
                nodeData,
                input,
                options,
                state,
                config,
                llm,
                agentPrompt,
                humanPrompt,
                conditionAgentInputVariablesValues,
                conditionAgentStructuredOutput,
                abortControllerSignal

View on GitHub (pinned to abe4a8601a)

Solutions

  1. List every `{var}` in the system and human prompts and add a matching key to Prompt Input Values.
  2. Use the Flowise variable picker so values are populated from state/vars automatically.
  3. Remove unused placeholders from the prompts.
  4. Match casing exactly — placeholders are case-sensitive.

Example fix

// before
agentPrompt = "Classify {topic} for {audience}"
promptValues = '{"topic":"sports"}' // missing audience -> throws [297]

// after
promptValues = '{"topic":"sports","audience":"kids"}'
Defensive patterns

Strategy: validation

Validate before calling

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

validateConditionAgentPromptVariables(agentPrompt, humanPrompt, conditionAgentInputVariablesValues)

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 Condition Agent's system or human prompt contains a `{variable}` placeholder that is not present in `promptValues` (and is not resolvable via `$flow`/`$vars`).

Common situations: Renamed a prompt placeholder without updating promptValues; casing mismatch; referenced `$flow` path that resolves to undefined; copied a prompt from another agent with different variables.

Related errors


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