Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AI Agent

ai.agent · version 2 · AI

Answers a prompt with a chat model that can call connected tools in a loop.

Ports

PortKindLabelRequiredMax connections
input 0main
input 1ai_languageModelyes1
input 2ai_memory1
input 3ai_tool
input 4ai_outputParser1
output 0main

Credentials

This node uses no credentials.

Parameters

NameTypeDefaultRequiredShown whenDescription
promptTypeoptions"auto"Prompt Source. One of auto, define.
textstringpromptType = definePrompt.
hasOutputParserbooleanfalseRequire Specific Output Format.
optionscollection
options.systemMessagestring"You are a helpful assistant."System Message.
options.maxIterationsnumber10Max Iterations. Maximum number of model calls per item.
options.returnIntermediateStepsbooleanfalseReturn Intermediate Steps.
options.passthroughBinaryImagesbooleantrueSend Binary Images. Attach image binaries of the input item to the prompt.

Import

Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.

Source typeVersion rangeStatusFixtures
@n8n/n8n-nodes-langchain.agent1unverified
@n8n/n8n-nodes-langchain.agent>=2 <3unverified