All modules
Module 08 · ai · intermediate
AI Support Agent
After this module you can build a customer support chatbot that looks up real data, takes actions, remembers the conversation, and knows when to hand off to a human.
What it does
A hosted chat page (n8n Chat Trigger) talks to an AI Agent for a demo coffee shop, Brewlab Coffee Co. The agent follows store policies from its system prompt, remembers the last 10 messages per session, and uses two tools: lookup_order (status, carrier, tracking, ETA) and create_support_ticket (hand-off to humans).
Flow
Support Chat → Support Agent
├─ model: OpenAI Chat Model (gpt-5-mini)
├─ memory: Conversation Memory (10 messages per session)
└─ tools: lookup_order, create_support_ticket
Verification status
- Hosted chat page: tested on n8n 2.43.6. Messages reach the agent and stop at "Error in sub-node OpenAI Chat Model" without a credential, as expected.
- Agent behavior (tools, memory, hand-off, staying on topic): needs an OpenAI credential.
WITH_CREDS=1 ./test/test.shruns a 5-turn conversation.
Files
| File | Tier | Purpose |
|---|---|---|
| lesson.md | Free | Step-by-step build |
| workflow/starter.json | Free | Chat trigger + order tool only |
| workflow/learner.json | Learner | Finished agent |
| workflow/business.json | Business | Business workflow (see setup guide) |
| workflow/business-create-ticket.json | Business | Ticket sub-workflow |
| assets/embed.html | Business | Website chat widget |
| setup-guide.md | Business | Credentials + configuration |
| exercises.md | Learner | Practice tasks |
| solutions.md | Learner | Exercise solutions |
| notes.md | Private | Learning log |
| sell/ | Private | Offer, video script, blog post |