---
title: "How Hazel Built an AI Coworker for Consumer Brands | MotherDuck | MotherDuck"
description: "Hazel's CTO walks through the data stack behind an AI coworker for consumer brands: a MotherDuck database per customer, dbt, Fivetran, dlt, and prompt_jev()."
canonical: "https://motherduck.com/videos/how-hazel-built-ai-coworker-consumer-brands/"
---

[BACK TO VIDEOS](/videos/)

[Stream](/videos/?category=Stream#videos-and-webinars-library)[MotherDuck Features](/videos/?category=MotherDuck%20Features#videos-and-webinars-library)[AI ML and LLMs](/videos/?category=AI%20ML%20and%20LLMs#videos-and-webinars-library)[Data Pipelines](/videos/?category=Data%20Pipelines#videos-and-webinars-library)

# Behind the Agent: How Hazel Built an AI Coworker for Consumer Brands

Oct 21, 2026

Patrik Devlin, co-founder and CTO of Hazel, talks with MotherDuck's Alex Monahan about how Hazel built an AI coworker for consumer brands and the data stack underneath it. Patrik shows Hazel in a demo account using `prompt_jev()` and embedded Dives, then walks through the architecture: Fivetran and dlt into S3, dbt models in MotherDuck, and one isolated MotherDuck database per customer.

## What Hazel does and why it works from raw data

Hazel is a vertical AI product for consumer brands, which Patrik describes as an AI coworker or operator. Brands connect their ad platforms, support tools (email and SMS), and Shopify, and once the data syncs the agent is ready to use. Patrik says co-founder Clint Dunn brings deep experience with consumer brand data, and some of that knowledge went into a prepackaged context layer, including things like lifetime value analysis.

Hazel deliberately sits on data that is closer to raw than most BI products, with dimension and fact tables but little pre-aggregation. The agent is good enough at pulling insights across data sets that Patrik would rather give it an open canvas than make assumptions about how it will be used. A single answer can take around twenty queries as Hazel checks itself. He also describes memory as a goal: letting Hazel get smarter as a whole brand uses it, without leaking one person's conversation to another.

## Demo: `prompt_jev()` and embedded Dives

Hazel added [`prompt_jev()`](https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/prompt-jev/) within a week or two of its launch. Patrik's demo account is a barbecue brand with no long-form text, so he classified email subject lines with Jev and merged the labels back onto about 10 million emails to compare open and click rates by category. He then asked Hazel to classify cancellation reasons from a subscription platform as controllable or not, tag every cancel session, and trend the controllable share by quarter. He also sees Jev driving marketing segments that can be exported to external systems.

Hazel's dashboards are [embedded Dives](https://motherduck.com/product/dives/): the AI writes the JSX, MotherDuck is the back end, and DuckDB WASM loads a local copy of the data so filters run in the browser. Alex adds that you can ask a Dive to cache a temp table locally, and that he has pushed this to roughly 100 million rows, with 10 to 50 million more comfortable for snappy responses.

## The architecture, step by step

Ingestion started on a homegrown dlt system. Hazel now runs Fivetran for connectors that already exist and keeps dlt for custom sources and for high-volume connectors, since Fivetran bills by monthly active rows. Everything lands in an S3 data lake partitioned by organization. About 700 dbt models run in MotherDuck, stopping at a layer closer to raw than most, so the agent works out how things connect.

To expose that single warehouse safely, each organization gets its own MotherDuck catalog and a service account named after the org ID, so no account can reach another brand's data. It also lets Hazel size compute per brand, such as more read scaling for a heavy customer, which Patrik calls hypertenancy. In the app, a request through the API gateway carries the user ID and org ID, and the org ID is used to look up the read-write or read-only credentials for that service account.

## Scale, cost, and guardrails

The largest table is email event data at roughly 500 million to 1 billion rows, and org databases run up to about a terabyte. Hazel sent 5.75 million queries through MotherDuck in the last 30 days, around 190,000 a day, and Patrik says he has not noticed latency differences and is probably not pushing the limits yet.

He says Hazel's MotherDuck query cost is very small next to its dbt transformation spend, and token cost is the real concern. Query tools cap how much data comes back in several bands and change the output format by size (JSON, TSV, or key-value), prompts push the agent to aggregate, and spreadsheet exports work by having Hazel write the query and the system run and stream it, so large results never pass through the agent. Observability is Langfuse, and users are not shown the SQL, since Hazel's customers are not technical.

Hazel is also experimenting with DuckLake. Its older data lake is an append-only partitioned layout that accrues too many small files, and Patrik is interested in compaction, the catalog, and data inlining. Looking ahead, he is most excited about ambient agents that find problems in your business and propose fixes without being asked.

TABLE OF CONTENTS

- What Hazel does and why it works from raw data
- Demo: `prompt_jev()` and embedded Dives
- The architecture, step by step
- Scale, cost, and guardrails

Start using MotherDuck now!

[Try 7 Days Free](https://auth.motherduck.com/authorize?app_source=web&response_type=code&client_id=bza3KWQpxRAFlTlRFXUo29AOg9xD7zcp&redirect_uri=https%3A%2F%2Fapp.motherduck.com%2F&state=STATE&auth_flow=signup&screen_hint=signup&ext-ph_distinct_id=2d7376ea-87eb-4da7-8f1d-b2f756b283c6)

## FAQS

### How does Hazel keep each customer's data isolated on MotherDuck?

Every organization gets its own MotherDuck catalog and a service account named after the org ID, so no account can access another brand's data. In the app, a request through the API gateway carries the user ID and org ID, and the org ID is used to look up the read-write or read-only credentials for that service account. The setup also lets Hazel size compute per brand.

### How big is the data Hazel queries?

The largest table is email event data at roughly 500 million to 1 billion rows, and each org database runs up to about a terabyte. Hazel sent 5.75 million queries through MotherDuck in the last 30 days, about 190,000 a day, and Patrik says he has not noticed latency differences.

### How does Hazel keep AI query costs under control?

Patrik says MotherDuck query cost is very small compared with Hazel's dbt transformation spend, so the real concern is token cost. Query tools cap returned data in several bands and change the format by size, prompts push the agent to aggregate, and spreadsheet exports run the query outside the agent so large results never become tokens.

### Does Hazel show users the SQL behind an answer?

No. Hazel uses Langfuse for observability on its own side, but its users are not technical and long SQL is not a good way to build trust, so Patrik is looking for other ways to earn it. He says a more technical product could make the SQL available on the side.

### Does Hazel use DuckLake?

Hazel is experimenting with it. Its older data lake is an append-only partitioned S3 layout that builds up too many small files, and Patrik is interested in DuckLake's compaction, catalog, and data inlining. He says they have not used it enough to have a strong opinion, and have not had issues so far.

## Related Videos

[44:21](/videos/aligned-on-numbers-chief-of-staff-data-apps/)[Oct 15, 2026](/videos/aligned-on-numbers-chief-of-staff-data-apps/)

### [Aligned on Numbers: A Chief of Staff's Data Apps](/videos/aligned-on-numbers-chief-of-staff-data-apps/)

Zoey Weaver interviews Kaitlyn Henry, MotherDuck's Chief of Staff, as she walks through two internal data apps: an AI token spend tracker built on a Flight and a weekly business review Dive. She explains how Guides, markdown files that define the company's key metrics, keep everyone's numbers consistent.

Stream

MotherDuck Features

AI ML and LLMs

[43:57](/videos/jev-for-analytics-use-cases/)[Oct 8, 2026](/videos/jev-for-analytics-use-cases/)

### [Jev for Analytics: 5 Use Cases](/videos/jev-for-analytics-use-cases/)

Mehdi Ouazza uses MotherDuck's prompt_jev() to turn text columns into columns you can GROUP BY. He classifies 100,000 consumer complaints, then walks through five use cases on real data: AI agent logs, Hacker News sentiment, sales calls, and two kinds of job-ad analysis.

Stream

MotherDuck Features

AI ML and LLMs

[51:58](/videos/build-a-data-agent-workshop/)[Oct 1, 2026](/videos/build-a-data-agent-workshop/)

### [Build a Data Agent in 60 Minutes](/videos/build-a-data-agent-workshop/)

Jacob Matson walks through a working data chat agent he built: MCP tools, an agentic loop, a tuned system prompt, hard-coded read-only guardrails, and telemetry. He demos it live against a real dataset, walks through the actual codebase, then shows the same backend re-platformed into a Slack bot.

Stream

MotherDuck Features

AI ML and LLMs

Data Pipelines

[View all](/videos/)