Data Warehouse Blog 3
Engineering · 9 min read

Turn messy event data into AI gold with Fullstory and Snowflake Cortex

Understanding user behavior at scale starts with good data. In previous posts, we showed how to transform raw Fullstory event data into structured, analyzable tables with dbt, and how to convert organized event streams into ML-ready features using the high-performance Polars library. 

Now we’re taking the next step: putting those signals to work for AI agents.

By the end of this post, you’ll understand how Fullstory’s Fullcapture and Silver Schema refinement transforms chaotic behavioral data into a foundation that powers agents. Specifically, we’ll focus on Snowflake Cortex agents for funnel analysis, UX insights, anomaly detection, and more.

From raw data to AI-ready insights

In theory, data is a goldmine for AI. LLM agents should be able to uncover patterns, predict behavior, and help teams optimize experiences. In practice, however, raw event data is messy. It’s fragmented, inconsistent, and incomplete. AI agents often stumble when they encounter:

  • Sparse or sampled sessions

  • Missing context about user behavior

  • Events that aren’t structured or normalized

Even the smartest AI can’t reason about what it can’t see.

This is where Fullstory shines. Think of data as the raw resource, Fullstory as the refinery that collects and refines it, and AI agents as the vehicles that drive insight from it. Fullstory doesn’t just capture every interaction; it organizes, structures, and enriches it so AI agents can understand and act on real user behavior.

Why LLM agents break on event data

AI agents—especially LLMs—promise a lot. They can summarize, predict, and reason, but only when the data they work with is structured, complete, and meaningful. Unfortunately, raw event data rarely meets these criteria.

Here’s why AI struggles:

  • Behavioral context is missing: Clicks, scrolls, and inputs are disconnected fragments. AI can’t infer intent when the surrounding sequence is absent.
    Sequences are opaque: LLMs don’t inherently understand temporal order or user flows unless the data is structured.
    Joins are hard: Connecting multiple events across pages, sessions, or users is complex, and missing relationships lead to gaps.

  • Sparse or sampled data: Many platforms sample sessions or drop events, creating blind spots that AI can’t fill.

  • Hallucinated structure: When AI tries to reason with incomplete data, it invents patterns that aren’t there, producing misleading insights.

Again: Even the smartest AI can’t reason about what it can’t see. Fullstory solves this problem by ensuring that AI can see the full story—every click, scroll, input, and signal is captured, organized, and refined.

Fullstory’s superpower: automatic, complete behavioral capture

Raw data alone is messy. Fullstory collects it and cleans it.

But the goal isn’t just to give you generic data; it’s to give you data that fits your business. That’s why Fullstory combines its complete auto-capture with the work you’ve already done. It ingests your existing data layers, integrates custom events and user attributes, and refines them into bespoke, AI-ready behavioral signals.

No manual instrumentation

Traditional analytics platforms rely on manual tagging, inconsistent event names, and guesswork. Fullstory captures everything automatically:

  • Clicks, scrolls, and mouse movements

  • Input changes and form interactions

  • Errors, crashes, and frustration signals (like rage clicks)

  • Page elements and network requests

This means no more partial funnels, incomplete flows, or analysts guessing what to track.

Completeness unlocks AI

LLMs perform best when the data is consistent, complete, and predictable. Fullstory ensures:

  • Every user session is captured

  • Signals are consistent across interactions

  • Structure is predictable for AI to reason about

AI is commonly used to tell you what happened. With Fullstory adding deep context, AI can tell you why things are happening

No sampling → no blind spots

Other tools may sample sessions or rely on user tagging discipline. This means critical signals like frustration moments or error patterns can be missed entirely. Fullstory captures every session and journey, so AI never loses the thread of behavioral intent.

Silver Schema turns raw behavior into queryable structure

Capturing everything is essential, but raw event data is still hard for AI to use. Fullstory’s raw model is typically one massive events table with nested JSON, plus lookup tables for elements, pages, and event definitions. While this contains a lot of valuable information, it’s cumbersome to query and computationally expensive when used by SQL analysts or AI agents.

Enter Silver Schema:

Silver Schema refines the raw model into a more structured, AI- and analyst-friendly format:

  • Flattened tables for events: Nested JSON objects (event properties and source properties) are extracted into their own tables, making queries faster and simpler.
    User table: Extracted from the raw model to centralize user-level information for easy joins and analysis.

  • Performance improvements: Queries against structured tables run faster and are easier to write correctly.

  • Consistency for AI and humans: Structured data reduces the likelihood of data consumers—whether human, agent, or a combination of the two—to misinterpret relationships and context.

Agent architecture: behavior-aware analytics made simple

Once data is captured and refined, AI agents can drive insight. While Fullstory supports different ways to query and analyze behavior, we recommend a multi-agent architecture. Instead of relying on one do-it-all agent to reason across your entire dataset, each agent handles a specific focus area, such as funnels, anomalies, UX signals, and support events. This helps parallelize reasoning and reduces complexity for individual agents.

Use cases for specialized agents

  • A funnel and conversion agent can be used to help uncover why users are dropping off at specific steps in key flows like checkout or onboarding. It can analyze structured events and frustration signals—like rage clicks, dead clicks, or form abandonment—to identify friction points and optimize conversions.

  • An anomaly detection agent can be used to identify sudden shifts in user behavior, such as spikes in error clicks or drops in interaction rates after a new release. This kind of agent is especially useful for surfacing regressions or UX issues before users report them.

  • A support or customer success agent can be used to reconstruct the sequence of events that led to user frustration or the creation of a support ticket. By surfacing high-friction moments automatically, it helps support teams troubleshoot faster and reduce time-to-resolution.

  • A UX and design agent can be used to identify interface issues on critical pages, such as pricing, product details, or sign-up. It aggregates signals such as rage clicks, layout shifts, and console errors to provide designers with actionable insights on usability friction.

  • By integrating an agent with Snowflake Cortex, it can query structured Silver Schema tables directly in Snowflake. User-defined functions (UDFs) enrich the analysis and allow team-specific logic. This supports reproducible, scalable AI reasoning without manual instrumentation.

Step-by-step example: behavior-aware analytics with Cortex

To see how Fullstory’s capture and refinement unlock AI insights, let’s walk through a concrete example: analyzing checkout funnel drop-offs using Silver Schema and Cortex agents. We’ll outline a high-level architecture and simple walkthrough for setting up a Fullstory-powered Cortex agent for funnel analysis.

Snowflake offers intelligence products, including the Cortex Analyst, which supports Text-to-SQL queries, and Cortex Search, which enables fuzzy or semantic search across your data. Agents can orchestrate both Analyst and Search tools, as well as any custom UDFs, to deliver actionable insights automatically.

Step 0 - Connect to Snowflake

First, connect Fullstory to Snowflake (see the Setup Guide). Once connected, you can query the tables immediately. Fullstory also supports historical backfills for existing customers, enabling you to analyze past trends immediately.

Step 1 - Define your agent architecture

In this setup, the Fullstory agent is a multi-purpose AI agent capable of:

  • Funnel analysis: Identifying checkout drop-offs and conversion bottlenecks

  • UX analysis: Detecting rage clicks, form errors, console messages, and other friction signals

  • Marketing analysis: Tracking campaign performance and engagement
    Search & knowledge discovery: Running semantic search over session transcripts, support tickets, and documentation

  • User-defined functions: Executing user-defined transformations or calculations

The agent orchestrates queries across structured Silver Schema tables, search services, and custom UDFs to produce actionable insights.

Step 2 - Semantic model: linking behavioral data

We will focus on building one of these analysts that powers the Fullstory Cortex Agent, the funnel and conversion analyst. All analysts use a semantic model or a semantic view to provide a clean, queryable model of user behavior. The semantic model organizes event data with metadata to facilitate understanding of the meaning of Fullstory tables and their relationships, enabling cross-table joins.

A semantic model can be defined in a YAML file. It details the logical tables, relationships between tables, and optionally verified queries and custom instructions. 

yaml-file-example

Before uploading the YAML file, you will need to create a stage and have the necessary write permission. 

Upload the YAML file:

Navigate from AI & ML → Cortex Analyst.

uploading-the-file-1

Then, Create New → Upload YAML.

Below is an example of how we defined the semantic model for the funnel and conversion analyst. (funnel_conversion_analyst.yaml)

uploading-the-file-2

Then, in Snowflake, navigate from AI & ML → Cortex Analyst → Create New → Upload YAML.

Step 3 - Create the Fullstory agent

Navigate from AI & ML → Agents.

create-agent-1

Next, click Create agent.

create-agent-2

Set database schema and agent name.

create-agent-3

Then, add a description. For this example, our description is: This agent orchestrates between Cortex Funnel Conversion Analyst (funnel_conversion_analyst.yaml), UX analyst, Marketing Analyst, as well as Cortex Search, and any custom UDFs for domain-specific metrics.

create-agent-4

Then, add tools:

  • Cortex Analyst

    • Add+ is where you link the YAML saved in a Snowflake stage.

  • Cortex Search for session transcripts or documents

  • Any custom UDFs for specialized calculations

Finally, define orchestration logic:

  • Define how the agent reasons through tasks, chooses the right tools, and sequences actions. For example: If a query spans both structured and unstructured data, clearly separate the sources. For any query, first determine whether it requires: 

    1. Structured data analysis → Use YAML/Cortex Analyst

    2. Report content/context → Use Cortex Search

    3. Both → Combine both services with clear source attribution.

  • Note: Please confirm which approach you'll use before providing each response.

Now, your agent is ready to produce actionable, behavior-aware insights about users per step, drop-off rates, and associated frustration signals.

Move from "what" to "why" with Fullstory

The difference between a demo and a production-ready AI agent is data trust. If you build AI on top of messy, sampled data, you are simply automating confusion. You might get an answer, but you won't know if it's true.

By combining Fullstory’s Fullcapture with the structure of Silver Schema and Snowflake Cortex, you:

  • Eliminate hallucinations: You ground the AI in absolute, unsampled behavioral truth.

  • Shift to causality: You stop asking "What happened?"  and start asking "Why did it happen?"

  • Democratize insights: You allow non-technical teams to query complex datasets using natural language, knowing the foundation is solid.

Ready to build AI agents you can trust? Whether you’re starting with funnel analytics, UX diagnostics, or fully orchestrated agents in Snowflake Cortex, Fullstory gives you the clarity, fidelity, and structure to make machine reasoning possible.

Request a demo to get started.

author

The Fullstory Data Science Team