Graphene

The agentic data stack

The “modern” data stack was built to serve traditional BI. A new stack is needed for agent-driven analytics.

Graphene dashboard

Designed for agent users

Agents struggle with fragmented context and UI-centric workflows. Graphene consolidates the entire stack into a single repo with everything as code: models, metrics, business context, queries—even dashboards.

See example project →
delay_factors.md
---
title: What makes your flight late?
layout: notebook
---

Every frequent flyer has a pet theory. Pick the right airline. Avoid Chicago. Never fly a 20-year-old plane. These intuitions have just enough truth in them to survive, but they obscure which factors actually move the needle — and by how much.

This is an analysis of FAA data covering roughly 345,000 U.S. commercial flights from 2000 to 2005. For each candidate factor — airline, origin airport, day of the week, and time of day — I measured how much of the variance in individual departure delays each one explains (η², or eta-squared).

## One factor dwarfs the rest

```gsql factor_importance
with
info as (
  from flights where cancelled = 'N'
  select avg(dep_delay) as grand_mean, var_pop(dep_delay) * count() as ss_total
),
hour_groups as (
  from flights where cancelled = 'N' and extract(hour from dep_time)::integer between 5 and 23
  select extract(hour from dep_time) as grp, count() as n, avg(dep_delay) as grp_mean
),
...
What makes your flight late? notebook

The semantic layer, reimagined

Introducing GSQL: a data modeling and query language designed for agents. Agents perform better with GSQL than both regular SQL and traditional BI APIs.

Read more →
GSQL Model
table orders (
  id BIGINT -- Primary key
  user_id BIGINT
  created_at DATETIME
  status STRING -- One of 'Processing', 'Shipped', 'Complete', 'Returned'
  amount FLOAT -- Amount paid by customer
  cost FLOAT -- Cost of materials

  join one users on user_id = users.id

  revenue: sum(case when status <> 'Returned' then amount else 0 end)
  cogs: sum(case when status <> 'Returned' then cost else 0 end)
  profit: revenue - cogs
  profit_margin: profit / revenue
)

table users (
  id BIGINT -- Primary key
  email VARCHAR
  country_code VARCHAR
)
GSQL Query
select users.country_code,  -- Join is implied via the model
  profit_margin,            -- Invoke modeled measures
  avg(amount) as aov
from orders
Compiled SQL
select users.country_code,
  (
    sum(case when status <> 'Returned' then amount else 0 end)
    - sum(case when status <> 'Returned' then cost else 0 end)
  )
  / sum(case when status <> 'Returned' then amount else 0 end)
    as profit_margin,
  avg(amount) as aov
from orders
left join users on orders.user_id = users.id
group by 1

Context beyond metrics

Agents need more than metric definitions. They also need a well-organized knowledge base that documents your business. Graphene follows the open standard skill format.

Try Graphene

Run the demo

Clone our example project and ask your coding agent a question about flight data.

View on GitHub

Try it on your data

Let us set up Graphene on your data. Your end users get analytics agents deployed in Slack and in our web app.

Book a call