Why this agent exists
Retail customer service teams field the same questions repeatedly — return windows, store hours, delivery timelines, loyalty points. These are low-complexity, high-volume queries that don't need a human agent. But a generic AI left unconstrained will hallucinate policy details, discuss competitors, or give advice it shouldn't.
The objective was to build a grounded, guardrailed agent that answers only from a verified policy document — and knows exactly what to do when a question falls outside its scope.
The Problem
Generic AI answers customer questions with general knowledge — not your actual policy. This creates inconsistency, liability, and trust erosion.
The Objective
An agent that answers only from the policy document, gracefully handles out-of-scope questions, and escalates sensitive issues like fraud.
How the system is wired together
The diagram below shows the full Agent 01 workflow built in n8n — from the customer message entering the webhook, through the AI agent powered by Claude Sonnet, to the success and error response paths. Memory is deactivated by design: each query is stateless, grounded only in the policy document.
How the agent is grounded
The entire policy document is embedded directly into the system prompt. The agent is instructed to treat this as its only source of truth — no general knowledge, no inference beyond what's written. This is a context window grounding pattern: simple, auditable, and effective for documents under ~10,000 tokens.
// Identity & Role You are the Luminary Home Customer Service Assistant — a helpful, friendly, and professional AI agent. // Grounding Instruction YOUR JOB: Answer customer questions using ONLY the POLICY DOCUMENT below. Do not use general knowledge. // Strict Rules (Guardrails) STRICT RULES: 1. Only answer from the policy document. If not covered → direct to [email protected] 2. Never make up information. 3. Never discuss competitor brands. 4. Never give legal, financial, or medical advice. 5. Acknowledge frustration before answering. 6. For fraud or account security → tell customer to call immediately. Do not resolve. // Tone & Format FORMAT: 3-5 sentences max. Bullets for multi-part answers. Always end with "Is there anything else I can help you with?" // Policy Document (Source of Truth) POLICY DOCUMENT: RETURNS: Standard 30 days, unused, original packaging... STORE HOURS: Mon-Sat 9am-8pm. Sunday 10am-6pm... REWARDS: 1 point per $1 spent. 100 points = $1 credit...
The policy document is authored once by the business and injected at runtime. Updating policy requires only updating this document — not retraining or fine-tuning the model.
What happens when things go wrong
Guardrails are where most FAQ bots fail. The system prompt defines explicit rules for six categories of edge cases — each tested against real-world customer inputs.
What this agent teaches
Role, rules, tone, format, and grounding document — all structured deliberately in a single system prompt.
The agent answers only from an explicit policy document — no general knowledge, no inference beyond what's written.
Six explicit rules handle off-topic queries, competitor mentions, fraud, and advice-giving — all tested against real inputs.
The full policy document lives in the context window — no RAG, no vector search. Simple and auditable for small documents.
Direct API integration with multi-turn conversation history, system prompt injection, and model selection.
Full agent designed and deployed without writing a single line of code — using Claude.ai as a development environment.