AI Agent: Patched
AI-generatedSummary
Send a user prompt to the AI Agent and receive its generated response, optionally controlling prompt input source and output format.
Inputs
- promptType (required) — Choose the source for the user prompt: either automatically from a connected Chat Trigger node's 'chatInput' field or define a custom prompt text.
- text (required) — The user prompt text sent to the AI Agent, either sourced automatically from input or defined manually depending on 'promptType'.
- hasOutputParser — Enable this to require a connected output parser node that specifies the format of the AI Agent's response.
- options.systemMessage — A system message sent to the agent before conversation starts to set assistant behavior (default: 'You are a helpful assistant').
- options.maxIterations — Maximum number of iterations the agent will perform before stopping (default 10).
- options.returnIntermediateSteps — Whether to include intermediate steps the agent took in its output (default false).
- options.passthroughBinaryImages — Whether to automatically pass through binary images as image-type messages to the agent (default true).
- options.batching.batchSize — Number of items to process in parallel for batch processing (default 1). Useful for rate limiting.
- options.batching.delayBetweenBatches — Delay in milliseconds between batches for rate limiting (default 0).
Output shape
a JSON object containing the AI Agent's response, including the generated message and optionally intermediate steps if requested.
If 'hasOutputParser' is enabled, the output format will conform to the connected output parser's specification. The prompt text can be automatically sourced or custom defined. Batch processing options allow rate limiting when processing multiple items.
Examples
Example 1: Using a connected Chat Trigger node
Set 'promptType' to 'auto' to use the input field 'chatInput' from the connected Chat Trigger node; AI Agent responds to this input.
Example 2: Defining a custom prompt
Set 'promptType' to 'define' and enter a static or expression-based prompt text in 'text'; AI Agent processes this prompt.