Better AI Agent

Advanced AI Agent with improved memory management and modern AI SDK (OpenAI Message Format)

Better AI Agent

AI-generated

Summary

Generate an AI-driven response using a connected language model, optionally incorporating conversation memory and external tools, based on a user-provided prompt either from a connected Chat Trigger node or defined input text.

Inputs

  • Prompt Type (required) — Choose the source of the user prompt: either automatically from a connected Chat Trigger node's 'chatInput' field or define the prompt manually.
  • Prompt (User Message) (required) — The user message text to send to the AI model. The value is taken automatically from the connected Chat Trigger node by default or can be manually set if 'Define below' is selected.
  • System Message — Defines the behavior and role of the AI assistant, guiding how it responds and uses available tools.
  • Max Steps — Sets the maximum number of tool call steps the AI agent will perform before stopping (default is 5, range 1-20).
  • Intermediate Webhook URL — If specified, the node sends partial replies and tool-call data as JSON via POST requests to this URL during execution.
  • Verbose Logs — Enable detailed console logging for debugging purposes.

Output shape

a single JSON object per input item containing the AI agent's text output and an array of execution steps

Output includes 'output' as the final generated text string, 'steps' as an array of intermediate generation steps, and 'totalSteps' indicating how many steps were performed. Memory and tools connected to the node influence behavior and are optional. Errors in AI generation or memory handling are surfaced appropriately.

Examples

Example 1: Respond to user chat input with AI using conversation memory and available tools.

Connect an AI language model node and optionally memory and tool nodes. Use connected Chat Trigger node to supply prompts automatically. Optionally customize the system message and execution steps.

Links

Discussion