AI Agent
ai.agent · version 2 · AI
Answers a prompt with a chat model that can call connected tools in a loop.
Ports
| Port | Kind | Label | Required | Max connections |
|---|---|---|---|---|
| input 0 | main | |||
| input 1 | ai_languageModel | yes | 1 | |
| input 2 | ai_memory | 1 | ||
| input 3 | ai_tool | |||
| input 4 | ai_outputParser | 1 | ||
| output 0 | main |
Credentials
This node uses no credentials.
Parameters
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
promptType | options | "auto" | Prompt Source. One of auto, define. | ||
text | string | promptType = define | Prompt. | ||
hasOutputParser | boolean | false | Require Specific Output Format. | ||
options | collection | ||||
options.systemMessage | string | "You are a helpful assistant." | System Message. | ||
options.maxIterations | number | 10 | Max Iterations. Maximum number of model calls per item. | ||
options.returnIntermediateSteps | boolean | false | Return Intermediate Steps. | ||
options.passthroughBinaryImages | boolean | true | Send 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 type | Version range | Status | Fixtures |
|---|---|---|---|
@n8n/n8n-nodes-langchain.agent | 1 | unverified | |
@n8n/n8n-nodes-langchain.agent | >=2 <3 | unverified |