n8n's AI capabilities are built on LangChain integration, exposed through ~70 AI specific nodes. The architecture follows a modular pattern: you compose agents by connecting a root AI Agent node with sub nodes for the LLM, memory, and tools.
Choose a Trigger
Chat trigger (conversational), webhook (API calls), schedule (periodic), or manual (testing).
Add an AI Agent Node
The root node that orchestrates the agent's behavior and reasoning loop.
Configure the LLM
Attach a language model sub node. Supported providers: OpenAI, Anthropic Claude, Google Gemini, AWS Bedrock, Azure OpenAI, Mistral, Ollama (local models), and more.
Add Memory
Attach memory sub nodes for conversation persistence: window memory, buffer memory, summary memory, or external via Zep.
Add Tools
Attach tool sub nodes that the agent can call during execution to interact with external services.
Connect to Data
Vector store nodes for RAG (Pinecone, Qdrant, Supabase, Zep), or any n8n integration as a data source.
Output Results
Send results via chat response, webhook, email, Slack, or any connected service.
The Workflow Tool: n8n's unique advantage
Ingest Documents
Load documents using document loader nodes and split them into chunks with text splitters
Create Embeddings
Generate vector embeddings using OpenAI, Cohere, or HuggingFace embedding models
Store in Vector DB
Save embeddings to Pinecone, Qdrant, Supabase, or another supported vector database
User Asks a Question
A query arrives via chat trigger, webhook, or another entry point
Retrieve Context
The vector store returns the most relevant document chunks based on semantic similarity
LLM Generates Answer
The language model combines retrieved context with the question to produce a grounded response
Ingest Documents
Load documents using document loader nodes and split them into chunks with text splitters
Create Embeddings
Generate vector embeddings using OpenAI, Cohere, or HuggingFace embedding models
Store in Vector DB
Save embeddings to Pinecone, Qdrant, Supabase, or another supported vector database
User Asks a Question
A query arrives via chat trigger, webhook, or another entry point
Retrieve Context
The vector store returns the most relevant document chunks based on semantic similarity
LLM Generates Answer
The language model combines retrieved context with the question to produce a grounded response