What is Wren AI?
Wren AI is an open-source generative BI (GenBI) engine that lets AI agents generate, deploy, and govern business intelligence — from a governed text-to-SQL answer through to a shareable dashboard — across more than 22 data sources. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0.
Overview
Wren AI is an open-source generative BI (GenBI) engine that lets AI agents generate, deploy, and govern business intelligence — from a governed text-to-SQL answer through to a shareable dashboard — across more than 22 data sources. It is aimed at the gap between a raw LLM writing plausible-but-wrong SQL and a traditional BI tool that cannot be driven by an agent at all.
What makes the output trustworthy is the layer underneath the model: an open AI context layer plus a governed semantic layer (MDL) that supplies what a database schema alone cannot — business semantics, approved definitions, worked examples, memory, and the unstructured company knowledge that lives in docs, wikis, and chat threads. That knowledge is stored as versionable, evidence-linked files — semantic models, an instructions.md of company definitions, and a memory of queries that worked — so it is reviewable, diff-able, and kept in Git rather than locked inside a vendor UI.
Correctness is handled with concrete primitives rather than prompting alone: schema-aware retrieval, MDL planning, dry-plan validation, structured errors with hints, value profiling, row limits, and an eval runner. Wren is agent-driven by design — you install the CLI and a small discovery stub for your AI client (Claude Code, Cursor, Cline, Codex and others), then drive it through your existing agent. The core, SDK, and skills are Apache-2.0 licensed; row- and column-level security and access control are reserved for the Cloud and self-hosted tiers. In May 2026 the separate Wren Engine repository was merged into this one under core/, and the older Docker-based chat-first BI product was preserved on the legacy/v1 branch as Wren GenBI Classic.
What it does
- Governed text-to-SQL grounded in a semantic layer (MDL), with schema-aware retrieval and MDL planning
- An open AI context layer that captures business definitions, examples, and memory as reviewable, Git-friendly files
- Dry-plan validation, row limits, and structured errors with hints to keep agent-generated SQL inside guardrails
- One-command deployment of browser-side dashboards, powered by wren-core-wasm, to your own Vercel or Cloudflare Pages account
- Coverage of 22+ data sources including BigQuery, Snowflake, PostgreSQL, ClickHouse, Amazon Redshift, and Databricks
- Agent-native workflow: a ~50-line discovery stub that auto-detects Claude Code, Cursor, Cline, Codex and other clients, with guides served on demand by the CLI
Getting started
Wren is agent-driven: install the CLI, install a one-file discovery stub for your AI client, then let your agent drive the rest. Workflow guides are served from inside the CLI so they always match the installed version.
Install the CLI
The core package includes DuckDB. Add per-datasource and memory extras as you need them.
pip install wrenai # core (DuckDB included)
pip install "wrenai[postgres,memory]" # add per-datasource and memory extras as neededInstall the discovery stub for your AI client
The stub teaches your agent to fetch workflow guides via wren skills get <name> and shaped prompts via wren ask.
npx skills add Canner/WrenAI # auto-detects Claude Code, Cursor, Cline, Codex, …Ask your agent to set things up
Open your agent in a project directory and ask it to connect a database — for example, "Use Wren to set up my Postgres database." The agent runs wren skills get onboarding, checks your environment, creates a connection profile, scaffolds the project, and runs a first query.
Enrich the project with business context
Ask the agent to enrich the project from your raw material. It runs wren skills get enrich-context in either grill mode (one question at a time) or auto-pilot mode (it reads <project>/raw/ and proposes), writing to MDL, instructions, queries, and memory — all reviewable and Git-friendly.
Ask questions and deploy a dashboard
Ask a business question and the agent fetches MDL context, recalls similar past queries, writes governed SQL, and executes it via wren query. Ask it to turn the answer into a dashboard and it runs wren skills get genbi, builds a browser-side app from your project's context, previews it locally, and ships it to your own Vercel or Cloudflare Pages account.
Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Let an AI agent answer business questions in SQL without letting it guess at your schema or your metric definitions
- Keep business logic — definitions, enums, units, approved joins — in a reviewable, version-controlled semantic layer instead of in prompts
- Turn an ad-hoc analytical answer into a shareable dashboard deployed to your own Vercel or Cloudflare Pages account
- Query across a mixed warehouse estate (BigQuery, Snowflake, PostgreSQL, ClickHouse, Redshift, Databricks) through one governed interface
How Wren AI compares
Wren AI alongside other open-source rag frameworks & platforms tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Dify | ★ 162k | An open-source platform with a visual workflow builder for creating LLM and RAG applications without writing much code. |
| graphify | ★ 155k | Turns a folder of code, docs, PDFs and images into a local knowledge graph with tree-sitter AST parsing and Leiden communities — queryable by agents over MCP, no vector store. |
| RAGFlow | ★ 95k | A RAG engine built around deep document understanding that turns complex files into a grounded, citation-backed question-answering layer. |
| Context7 | ★ 65.7k | Context7 pulls current, version-specific documentation and code examples for any library and feeds them into your LLM, available as a CLI skill or an MCP server. |
| Pathway | ★ 61.9k | A Python framework with a Rust streaming engine that keeps ETL, real-time analytics and RAG pipelines continuously up to date as source data changes. |
| LightRAG | ★ 41k | A graph-based RAG system that builds an entity-and-relationship knowledge graph for fast retrieval and easy incremental updates. |
| PageIndex | ★ 40.8k | PageIndex turns long PDFs into a table-of-contents tree and uses LLM reasoning to retrieve relevant sections, with no vector database and no chunking. |
| Wren AI | ★ 18.4k | Governed text-to-SQL and dashboards for AI agents |
