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 dashb

What is 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.

Overview of WrenAI

What it is

WrenAI is an open-source generative BI (GenBI) engine. It provides a governed semantic layer and an AI context layer for AI agents such as Claude Code, Cursor, MCP clients, and LangChain. The engine turns natural-language questions into correct SQL and shareable dashboards while staying within user-defined guardrails. Schemas tell an agent where data lives; Wren tells it what the data means through approved metric definitions, enums, units, joins, worked examples, and tribal knowledge from docs and chat threads. All context is stored as reviewable YAML and Markdown in a repository owned by the user.

Key features

  • Generates governed SQL and deploys dashboards in one agent-driven loop.
  • Schema-aware retrieval, MDL planning, dry-plan validation, row limits, value profiling, and structured errors with hints keep agent SQL inside guardrails.
  • Business definitions, enums, approved joins, and proven examples are versioned as YAML and Markdown in a Git repository.
  • Works with Claude Code, Cursor, Cline, Codex, MCP clients, LangChain, and 50+ other agents.
  • Supports 22+ data sources including BigQuery, Snowflake, PostgreSQL, ClickHouse, Amazon Redshift, Databricks, DuckDB, and more on an Apache DataFusion engine.
  • Core engine, SDK, and skills are open-source under Apache-2.0.

Use cases

  • Turning natural-language questions into governed SQL and shareable dashboards.
  • Managing business definitions as version-controlled YAML and Markdown in Git.
  • Reviewing and diffing metric changes through pull requests.
  • Deploying agent-built dashboards to Vercel or Cloudflare Pages.

Getting started

Three commands to get started: bash pip install wrenai npx skills add Canner/WrenAI Then open your agent in a project folder and ask a question (e.g., “Use Wren to set up my Postgres database.”). For additional connectors, use pip install wrenai[postgres,memory] (or other extras). If pip is slow from mainland China, use: 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.

License and pricing

The core engine, SDK, and skills in this repository are licensed under Apache-2.0 and are free forever and self-hostable. Commercial features (row- and column-level security, GenBI UI, dashboards, scenario AI harnesses, advanced security and audit, support and SLAs) are available as Wren AI Cloud or self-hosted Enterprise Plus.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/cannerwrenai.svg)](https://yunodb.com/tools/cannerwrenai?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/cannerwrenai?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/cannerwrenai.svg" alt="Featured on YunoDB" height="20"></a>