Live demo · simulated agent, real computation

AI Insights Agent

Ask a question in plain English. The agent plans, writes SQL, executes it against a synthetic campaign warehouse in your browser, and synthesizes an answer — the same plan→query→synthesize loop as the LangChain SQL-agent insights bot I built over Redshift. The numbers it returns are genuinely computed from the data below.

Agentic loopText-to-SQL patternLangChain-style
insights-agent · warehouse: campaign_perf (synthetic)
Hi — I'm wired to a synthetic MENA campaign warehouse. Ask me something, or tap a question on the right. Try "Which channel has the best ROAS?"

How it works

Plan → SQL → Execute → Synthesize

This demo recreates the agent loop deterministically: the question is matched to an intent, a SQL statement is generated and displayed, then actually evaluated in JavaScript against the in-browser dataset — group-bys, aggregations, and ratios are computed live, not hard-coded. The production version replaced the intent matcher with an LLM (Llama-3 via Ollama + LangChain SQL agent) querying Redshift, with the same human-visible reasoning trace so analysts could audit every answer.

That visible trace is the point: in regulated, client-facing environments, an agent that shows its SQL earns trust an answer-only chatbot never will.