Knowledge-grounded chat agent
Two flows working together. The retrieval flow runs on every user message — looks up relevant docs, recalls prior conversation, and generates a grounded answer. The ingestion flow runs whenever the knowledge base needs an update — pulls files from Drive, chunks them, and writes the vectors to Supabase.
Building the knowledge base
Runs manually (or on a schedule) when the knowledge base needs new content. Pulls a file from Drive, chunks it cleanly, embeds it with Gemini, and writes the vectors to Supabase pgvector.
Answering a user message
Runs on every chat turn. The agent loads prior conversation, retrieves the most relevant docs from the vector store, and generates a grounded answer.
This one isn't a demo. It's running right now.
The chat bubble in the corner of this site is this exact workflow — an n8n RAG agent answering from LazyLoop's own knowledge base. Ask it about pricing, timelines or what's automatable.
What makes it production-ready
Retrieval-grounded answers
Every reply is anchored to a real document in your knowledge base — no hallucinations, no stale facts.
Stateful conversations
Postgres-backed memory means the agent remembers prior turns, customer context, and unresolved threads.
Swappable LLM
Routed through OpenRouter so you can A/B Claude vs GPT-4 vs Llama without touching the workflow.
Production-grade
Error retries, structured logging, rate limits, and graceful human hand-off when the agent isn't confident.