Canner /WrenAI

GenBI (Generative BI) for AI agents, an open-source, governed text-to-SQL through an open context layer that turns natural-language questions into trusted dashboards, charts, and SQL across 20+ data sources, such as BigQuery, Snowflake, PostgreSQL, ClickHouse, Amazon Redshift, Databricks and more.

★ 18,123⑂ 2,089
PythonCreated 2024-03-13www.getwren.ai/en/open-core
18,123
stars
+65+82+284
2,089
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions

README

Open-source GenBI for AI agents

Your agents generate governed SQL, deploy dashboards, and keep business definitions in Git, across 22+ data sources.



Get started in 3 commands ↓  ·  Read the docs →  ·  Join Discord →








!Stars





---

 What WrenAI is

WrenAI is the open-source generative BI (GenBI) engine. It gives the AI agents you already use (Claude Code, Cursor, MCP clients, LangChain) a governed semantic layer and an AI context layer, so they turn business questions into correct SQL, ship the answer as a shareable dashboard, and stay inside your guardrails.

Schemas tell an agent where data lives. Wren tells it what the data means: approved metric definitions, enums, units, joins, worked examples, and the tribal knowledge buried in docs and chat threads. All of it lives as reviewable YAML and Markdown in a repo you own.


  
  


 Quickstart

Three commands, then your agent does the rest. Works with Claude Code, Cursor, Cline, Codex, and 50+ other agents.

1. Install the CLI

bash
pip install wrenai


Add connector extras as you need them, for example pip install "wrenai[postgres,memory]".

2. Teach your agent about Wren

bash
npx skills add Canner/WrenAI


This installs a ~50-line discovery stub. Your agent fetches full workflow guides from the CLI on demand, so instructions always match the installed version.

3. Open your agent in a project folder and ask

 "Use Wren to set up my Postgres database."

The agent checks your environment, creates a connection profile, scaffolds the project, and runs a first query.

No database handy? Say "Use Wren with the bundled jaffle_shop sample" and run the same flow against a real sample warehouse.


Slow pip install from mainland China?

bash
pip install wrenai -i https://pypi.tuna.tsinghua.edu.cn/simple


If HuggingFace model downloads time out, run export HF_ENDPOINT=https://hf-mirror.com before using the CLI.



 Then keep going

Once you're connected, these three prompts cover the whole GenBI loop:

| Beat | Ask your agent | What happens |
|---|---|---|
| Know | "Enrich my Wren project with the business context in raw/." | Runs wren skills get enrich-context. Writes definitions, examples, and memory as reviewable files. |
| Generate | "Who are our top 10 customers by sales this quarter?" | Recalls MDL context and past queries, writes governed SQL, executes via wren query. |
| Deploy | "Turn that into a dashboard I can filter and share, deployed to Vercel." | Runs wren skills get genbi. Builds a browser-side app and returns a live URL on your Vercel or Cloudflare Pages account. |



Follow the full quickstart →  ·  Build & deploy a GenBI app →



 Why agent builders pick WrenAI

- Answers and dashboards, not just SQL. Generate a governed answer, deploy it as a dashboard, share the URL. One agent-driven loop, end to end.
- Correct instead of confidently wrong. Schema-aware retrieval, MDL planning, dry-plan validation, row limits, value profiling, and structured

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON