n8n AI Agent Setup Guide: Build Workflow Automations with 197K Stars
n8n is a visual workflow automation platform with native AI agent support - drag and drop to build automations without complex coding. This guide covers installation, your first AI Agent workflow (Chat Trigger + AI Agent + LLM + tools), and core node configuration.
💡 What You Will Learn
n8n is a visual workflow automation platform with native AI agent support - drag and drop to build automations without complex coding. This guide covers installation, your first AI Agent workflow (Cha
📜 Table of Contents
n8n AI Agent Setup Guide
n8n is a visual workflow automation platform (near 200K GitHub stars, live data on GitHub) with native AI agent support. Drag-and-drop nodes instead of writing code.
Install
Docker: docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n, then open localhost:5678. Or npm install n8n -g && n8n start. Community edition is open source and free; cloud plans priced on the official site.
First AI Agent in 4 steps
- Add Chat Trigger (entry point for user messages).
- Add AI Agent node connected to it.
- Configure the LLM: cloud API (OpenAI/Anthropic with key) or local (Ollama at localhost:11434).
- Attach tools (e.g. HTTP Request for order status), save, test in chat.
Key nodes
Chat Trigger (entry), AI Agent (brain: LLM + system prompt), LLM node (model connection), Tool nodes (HTTP etc.), Memory (context), IF/Switch (branches).
Writing a good system prompt
Role + boundaries + output format. Example: "You are an e-commerce support assistant. Only answer order/logistics/returns questions. Say 'I don't know' and hand off to humans when unsure. Conclusion first, then one sentence."
Use cases
Support triage, content research to report, PDF data extraction to spreadsheet.
FAQ
Q: Free? A: Community edition is open source; cloud plans per official pricing. Q: Coding needed? A: No for basic workflows; expressions only for special APIs. Q: Local models? A: Yes, use the Ollama LLM node with a local address.
Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only โ no paid placements.
