BI built for
agents
With Graphene, agents do the busy work of querying and visualizing data so you can ask 10x more questions.
Rooted in code
Models, dashboards, queries, and other tools are all backed by code and CLIs, which agents do best with. Lives in your repo. Open source.
See example project → flight-analytics-dashboard.md
# Flight Analytics Dashboard
A comprehensive dashboard showcasing flight data metrics from 2000-2005.
## Key Metrics
<Row>
<BigValue data=flights value=count(*) title="Total Flights" fmt=num0 />
<BigValue data=flights value=sum(miles_flown) title="Total Miles Flown" fmt=num0m />
<BigValue data=flights value=on_time_departure_rate title="On-Time Departure Rate" fmt=pct1 />
<BigValue data=flights value=on_time_arrival_rate title="On-Time Arrival Rate" fmt=pct1 />
</Row>
```sql weekly_trends
select
date_trunc('week', dep_time) as week,
count(*) as flight_count,
avg(distance) as avg_distance,
cancellation_rate
from flights
group by 1
order by 1 asc
```
...
flight-analytics-dashboard.md
# Flight Analytics Dashboard
A comprehensive dashboard showcasing flight data metrics from 2000-2005.
## Key Metrics
<Row>
<BigValue data=flights value=count(*) title="Total Flights" fmt=num0 />
<BigValue data=flights value=sum(miles_flown) title="Total Miles Flown" fmt=num0m />
<BigValue data=flights value=on_time_departure_rate title="On-Time Departure Rate" fmt=pct1 />
<BigValue data=flights value=on_time_arrival_rate title="On-Time Arrival Rate" fmt=pct1 />
</Row>
```sql weekly_trends
select
date_trunc('week', dep_time) as week,
count(*) as flight_count,
avg(distance) as avg_distance,
cancellation_rate
from flights
group by 1
order by 1 asc
```
...
flight-analytics-dashboard.md
# Flight Analytics Dashboard
A comprehensive dashboard showcasing flight data metrics from 2000-2005.
## Key Metrics
<Row>
<BigValue data=flights value=count(*) title="Total Flights" fmt=num0 />
<BigValue data=flights value=sum(miles_flown) title="Total Miles Flown" fmt=num0m />
<BigValue data=flights value=on_time_departure_rate title="On-Time Departure Rate" fmt=pct1 />
<BigValue data=flights value=on_time_arrival_rate title="On-Time Arrival Rate" fmt=pct1 />
</Row>
```sql weekly_trends
select
date_trunc('week', dep_time) as week,
count(*) as flight_count,
avg(distance) as avg_distance,
cancellation_rate
from flights
group by 1
order by 1 asc
```
...
Fully steerable
Agent skills allow you to customize agent behavior based on your unique data and business processes. Graphene follows the open standard skill format.
cohort-analysis/SKILL.md
---
name: cohort-analysis
description: Performs cohort analysis for customer behavior patterns over time. Use when analyzing retention, LTV, or other metrics by customer cohorts, or when the user asks about cohorts, retention curves, or customer lifecycle patterns.
---
# Cohort Analysis
Users expect cohort analysis to look a certain way. This guide walks through it.
## Query Pattern
Always group by two dimensions:
1. **Cohort period**, e.g., the month a user's subscription starts
2. **Elapsed time units**, e.g., the number of months that have elapsed since the subscription started
Then aggregate the target metric(s). Filter to the last 12 months if not specified otherwise.
## Visualization Options
### Option 1: Multi-Series Line Chart
... about-sales-team/SKILL.md
---
name: about-sales-team
description: How to perform analytics for sales and GTM-related areas
---
# Sales
## Overview
The sales team is broken down into sub-teams for inbound sales, outbound sales, and enterprise sales. The Enterprise Sales owns all accounts at the enterprise level (>1,000 employees) and includes both the inbound and outbound directions for this level.
We use Salesforce to manage our sales operations. The most important tables are `dim_salesforce_opportunities` and `dim_salesforce_accounts`.
## Key Concepts
### Opportunity Types
* **New Business:** First-time purchase by a new account.
* **Expansion:** Upsell or cross-sell to an existing account.
* **Renewal:** Continuation of an existing contract.
### Business Sizes
* **SMB:** <100 employees.
* **Mid-Market:** 101 - 1,000 employees.
* **Enterprise:** >1,000 employees.
## Glossary of terms
... 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 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 Try it on your data
Graphene is currently in a closed access beta. We work closely with our early customers to solve real-world problems.
Join the waitlist