n8n-io/n8n · warning
AGENT_STATIC_PROMPT
AGENT_STATIC_PROMPT
Error message
Is input data required for '${node.name}'? If so, add an expression to the prompt. When following a chat trigger node, use { promptType: 'auto', text: '={{ $json.chatInput }}' }. Or use { promptType: 'define', text: '={{ ... }}' } to add dynamic data like input data. What it means
Warning-level validator issue (code AGENT_STATIC_PROMPT) emitted by the agent validator when an Agent node's text prompt has no expression at all — i.e. it is empty or a plain literal with no '=' expression and no malformed '{{ }}' fragment. Such a static prompt cannot incorporate incoming item data, which defeats the purpose of an agent that should react to runtime input.
Source
Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/plugins/validators/agent-validator.ts:52
}
const promptType = params.promptType as string | undefined;
// Skip checks for auto/guardrails mode (undefined defaults to auto)
if (!promptType || promptType === 'auto' || promptType === 'guardrails') {
return issues;
}
// Check: Static prompt (no expression)
const text = params.text;
const hasValidExpression = containsExpression(text);
const hasMalformedExpression = containsMalformedExpression(text);
// Only warn about static prompt if there's NO expression at all
// (MISSING_EXPRESSION_PREFIX will handle malformed expressions)
if (!text || (!hasValidExpression && !hasMalformedExpression)) {
issues.push({
code: 'AGENT_STATIC_PROMPT',
message: `Is input data required for '${node.name}'? If so, add an expression to the prompt. When following a chat trigger node, use { promptType: 'auto', text: '={{ $json.chatInput }}' }. Or use { promptType: 'define', text: '={{ ... }}' } to add dynamic data like input data.`,
severity: 'warning',
nodeName: node.name,
});
}
// Check: No system message
const options = params.options as Record<string, unknown> | undefined;
const systemMessage = options?.systemMessage ?? params.systemMessage;
if (
!systemMessage ||
(typeof systemMessage === 'string' && systemMessage.trim().length === 0)
) {
issues.push({
code: 'AGENT_NO_SYSTEM_MESSAGE',
message: `'${node.name}' has no system message. System-level instructions should be in the system message field.`,
severity: 'warning',
nodeName: node.name,View on GitHub (pinned to 5ac6606e81)
Solutions
- If following a chat trigger, set text to '={{ $json.chatInput }}' (promptType 'auto').
- Otherwise set promptType 'define' and reference input data, e.g. '={{ $json.someField }}'.
- Confirm the '=' prefix is present so n8n evaluates the value as an expression.
Example fix
// before
agent({ text: 'Summarize this' })
// after
agent({ promptType: 'auto', text: '={{ $json.chatInput }}' }) Defensive patterns
Strategy: validation
Validate before calling
function hasExpression(value: unknown): boolean {
return typeof value === 'string' && value.startsWith('=');
}
const text = agentParams.text;
if (!hasExpression(text)) {
// warn: static prompt — add an expression
} Prevention
- Always start agent prompts with '=' when they must ingest data.
- Use promptType 'auto' with $json.chatInput for chat-triggered agents.
- Run the agent validator during local builds to catch static prompts early.
When it happens
Trigger: Defining an agent node with { text: 'Summarize this' } (no expression), or an empty text field, while expecting the agent to process incoming workflow data.
Common situations: First-draft agent config that hardcodes the prompt; copying a template that lost its expression; expecting chat input without wiring $json.chatInput.
Related errors
- AGENT_STATIC_PROMPT
- AGENT_NO_SYSTEM_MESSAGE
- The ‘text parameter is empty.
- The ‘text‘ parameter is empty.
- The ‘text‘ parameter is empty.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/2d8bc12c8de74e60.
Report an issue: GitHub.