{"record":{"id":"b486eccf55f6b9f9","repo":"FlowiseAI/Flowise","slug":"condition-agent-input-variables-values-are-not-pro","errorCode":null,"errorMessage":"Condition Agent input variables values are not provided!","messagePattern":"Condition Agent input variables values are not provided!","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/sequentialagents/ConditionAgent/ConditionAgent.ts","lineNumber":424,"sourceCode":"\n        const startLLM = sequentialNodes[0].startLLM\n        const llm = model || startLLM\n        if (nodeData.inputs) nodeData.inputs.model = llm\n\n        let conditionAgentInputVariablesValues: ICommonObject = {}\n        if (promptValuesStr) {\n            try {\n                conditionAgentInputVariablesValues = typeof promptValuesStr === 'object' ? promptValuesStr : JSON.parse(promptValuesStr)\n            } catch (exception) {\n                throw new Error(\"Invalid JSON in the Condition Agent's Prompt Input Values: \" + exception)\n            }\n        }\n        conditionAgentInputVariablesValues = handleEscapeCharacters(conditionAgentInputVariablesValues, true)\n\n        const conditionAgentInputVariables = uniq([...getInputVariables(agentPrompt), ...getInputVariables(humanPrompt)])\n\n        if (!conditionAgentInputVariables.every((element) => Object.keys(conditionAgentInputVariablesValues).includes(element))) {\n            throw new Error('Condition Agent input variables values are not provided!')\n        }\n\n        const abortControllerSignal = options.signal as AbortController\n\n        const conditionalEdge = async (state: ISeqAgentsState, config: RunnableConfig) =>\n            await runCondition(\n                conditionName,\n                nodeData,\n                input,\n                options,\n                state,\n                config,\n                llm,\n                agentPrompt,\n                humanPrompt,\n                conditionAgentInputVariablesValues,\n                conditionAgentStructuredOutput,\n                abortControllerSignal","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/sequentialagents/ConditionAgent/ConditionAgent.ts#L406-L442","documentation":"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.","triggerScenarios":"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`).","commonSituations":"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.","solutions":["List every `{var}` in the system and human prompts and add a matching key to Prompt Input Values.","Use the Flowise variable picker so values are populated from state/vars automatically.","Remove unused placeholders from the prompts.","Match casing exactly — placeholders are case-sensitive."],"exampleFix":"// before\nagentPrompt = \"Classify {topic} for {audience}\"\npromptValues = '{\"topic\":\"sports\"}' // missing audience -> throws [297]\n\n// after\npromptValues = '{\"topic\":\"sports\",\"audience\":\"kids\"}'","handlingStrategy":"validation","validationCode":"function validateConditionAgentPromptVariables(agentPrompt, humanPrompt, values) {\n  const required = [...new Set([...getInputVariables(agentPrompt), ...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 Condition Agent prompt variables: ${missing.join(', ')}`)\n  }\n  return required\n}\n\nvalidateConditionAgentPromptVariables(agentPrompt, humanPrompt, conditionAgentInputVariablesValues)","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 so prompt variables auto-populate.","Match placeholder casing exactly.","Remove orphan placeholders from the prompt text."],"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"}