Problem
The dashboard covers a lot of ground: segments, experiences, goals, on-site content, ads, and analytics for all of it. Building a segment meant knowing which property to pick, which condition type it takes, and how AND and OR groups nest. Most users knew what they wanted — "people who read pricing twice this week" — not how to express it.
A chatbot that explains the UI doesn't fix that. The assistant had to do the work, on the user's own data, without ever doing something they didn't ask for.
How a turn works
What I built
The runtime — routing, the gates, memory — was a team effort. These parts were mine:
- Tool handlers for segments, experiences, goals, events and content: turning a model's structured call into a valid segment condition tree or experience payload, and checking every ID it names against what actually exists. A made-up segment ID fails loudly instead of quietly matching nothing.
- The Implement flow. AI recommendations on the analytics pages carry an Implement button; the backend seeds the agent with that recommendation, treats the click as the approval, and the agent builds the segment or experience — with a live audience count computed in the background while the segment takes shape.
- Page content in the agent's working knowledge, so it creates and edits on-site content with the page in view instead of guessing at it.
- A structured AI ledger: every model call across the product tagged with category, operation, entity and source, plus a billing policy and credit bucket, so AI usage can be reported, capped and billed per feature.
- An agent-authored flag on everything the agent creates, so analytics can tell agent-made from hand-made.
Decisions
Outcome
A user can go from "show me visitors who read pricing twice this week" to a saved segment with a live size in one conversation, and from an analytics recommendation to a running experience in one click. Those recommendations come out of the topic analytics — the next case study.