Skip to content

RAG Agent

Retrieve and generate an action plan and execute it. Can use external tools.

Retrieves relevant information from a knowledge base and generates answers using an LLM with optional tool usage.

Use this agent when you need to answer questions using information from indexed documents or knowledge bases.

SettingNotes
System messageSource-backed field from the node schema.
OptionsSource-backed field from the node schema.

Returns node-specific output described by the implementation and visible in workflow execution data.

  • No explicit credential or node dependency is declared in the node description.

Connect a chat memory to the agent’s memory input to give it a conversation:

  1. Before calling the model, the agent loads the conversation’s earlier messages and adds them to the prompt as chat history.
  2. It saves the incoming prompt as a user message.
  3. After the model answers, it saves the reply as an assistant message (structured replies from an output parser are saved as JSON text).

With Local Memory or Persistent Chat Memory the conversation is kept across runs; Window Buffer Memory only lasts for one run.

This is also how a Chat Trigger gets its replies: connect the same memory to the trigger and to this agent, and set the prompt to {{ $json.chatInput }}. The chat window shows the messages this agent saves.

Connect RAG Agent to an AI agent or dependency input that accepts this dependency type, then run the agent with data from previous nodes.

  • Check that required settings are present before running the node.
  • If the node uses browser page data, run it on the target tab after the page has loaded.
  • If it calls an external service, verify credentials, permissions, and rate limits.
  • This node has source tests; use them as the reference for edge-case behavior during maintenance.