Skip to content
Back to search

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.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/canner/wrenai with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/canner/wrenai'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/canner-wrenai/badge.svg)](/listings/canner-wrenai)

HTML

<a href="/listings/canner-wrenai"><img src="/api/listings/canner-wrenai/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Three commands, then your agent does the rest. Works with Claude Code, Cursor, Cline, Codex, and [50+ other agents](https://docs.getwren.ai/oss/get_started/quickstart).

**1. Install the CLI**

pip install wrenai

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

**2. Teach your agent about Wren**

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.

<details> <summary>Slow <code>pip install</code> from mainland China?</summary>

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.

</details>

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

<div align="center">

**[Follow the full quickstart →](https://docs.getwren.ai/oss/get_started/quickstart)** &nbsp;·&nbsp; [Build & deploy a GenBI app →](https://docs.getwren.ai/oss/guides/genbi)

</div>

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 300 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center" id="top">
  2. <a href="https://getwren.ai">
  3. <picture>
  4. <source media="(prefers-color-scheme: dark)" srcset="./misc/wren-ai-banner-dark.png">
  5. <img src="./misc/wren-ai-banner.png" width="100%" alt="WrenAI: open-source GenBI for AI agents">
  6. </picture>
  7. </a>
  8. ### Open-source GenBI for AI agents
  9. **Your agents generate governed SQL, deploy dashboards, and keep business definitions in Git, across 22+ data sources.**
  10. <br/>
  11. **[Get started in 3 commands ↓](#quickstart)** &nbsp;·&nbsp; **[Read the docs →](https://docs.getwren.ai)** &nbsp;·&nbsp; **[Join Discord →](https://discord.gg/5DvshJqG8Z)**
  12. <br/>
  13. [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/Canner/WrenAI/blob/main/LICENSE)
  14. [![PyPI](https://img.shields.io/pypi/v/wrenai?label=wrenai)](https://pypi.org/project/wrenai/)
  15. [![GitHub Release](https://img.shields.io/github/v/release/Canner/WrenAI?logo=github&label=release)](https://github.com/Canner/WrenAI/releases)
  16. [![Discord](https://img.shields.io/discord/1227143286951514152?logo=discord&label=Discord)](https://discord.gg/5DvshJqG8Z)
  17. [![Follow on X](https://img.shields.io/badge/follow-@getwrenai-blue?logo=x&logoColor=white)](https://x.com/getwrenai)
  18. ![Stars](https://img.shields.io/github/stars/Canner/WrenAI?style=social)
  19. <a href="https://trendshift.io/repositories/9263" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9263" alt="Canner/WrenAI | Trendshift" width="250" height="55" /></a>
  20. </div>
  21. ---
  22. ## What WrenAI is
  23. 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.
  24. 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.
  25. <picture>
  26. <source media="(prefers-color-scheme: dark)" srcset="./misc/wren-ai-architecture-dark.png">
  27. <img src="./misc/wren-ai-architecture.png" width="100%" alt="Wren AI generative BI architecture — semantic layer and AI context layer for AI agents">
  28. </picture>
  29. ## Quickstart
  30. Three commands, then your agent does the rest. Works with Claude Code, Cursor, Cline, Codex, and [50+ other agents](https://docs.getwren.ai/oss/get_started/quickstart).
  31. **1. Install the CLI**
  32. ```bash
  33. pip install wrenai
  34. ```
  35. Add connector extras as you need them, for example `pip install "wrenai[postgres,memory]"`.
  36. **2. Teach your agent about Wren**
  37. ```bash
  38. npx skills add Canner/WrenAI
  39. ```
  40. 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.
  41. **3. Open your agent in a project folder and ask**
  42. > "Use Wren to set up my Postgres database."
  43. The agent checks your environment, creates a connection profile, scaffolds the project, and runs a first query.
  44. **No database handy?** Say "Use Wren with the bundled `jaffle_shop` sample" and run the same flow against a real sample warehouse.
  45. <details>
  46. <summary>Slow <code>pip install</code> from mainland China?</summary>
  47. ```bash
  48. pip install wrenai -i https://pypi.tuna.tsinghua.edu.cn/simple
  49. ```
  50. If HuggingFace model downloads time out, run `export HF_ENDPOINT=https://hf-mirror.com` before using the CLI.
  51. </details>
  52. ### Then keep going
  53. Once you're connected, these three prompts cover the whole GenBI loop:
  54. | Beat | Ask your agent | What happens |
  55. |---|---|---|
  56. | **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. |
  57. | **Generate** | "Who are our top 10 customers by sales this quarter?" | Recalls MDL context and past queries, writes governed SQL, executes via `wren query`. |
  58. | **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. |
  59. <div align="center">
  60. **[Follow the full quickstart →](https://docs.getwren.ai/oss/get_started/quickstart)** &nbsp;·&nbsp; [Build & deploy a GenBI app →](https://docs.getwren.ai/oss/guides/genbi)
  61. </div>
  62. ## Why agent builders pick WrenAI
  63. - **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.
  64. - **Correct instead of confidently wrong.** Schema-aware retrieval, MDL planning, dry-plan validation, row limits, value profiling, and structured errors with hints keep agent SQL inside guardrails.
  65. - **Business meaning lives in Git.** Metric definitions, enums, approved joins, and proven examples are versioned files. Review them in a pull request. Diff them. Take them with you.
  66. - **Works through the agents you already run.** Claude Code, Cursor, Cline, Codex, MCP clients, LangChain. Wren is a layer, not another chat UI to adopt.
  67. - **Sits on your existing stack.** Warehouse, transformation pipelines, existing semantic models. 22+ sources on one Apache DataFusion engine.
  68. - **Open by default.** Core engine, SDK, and skills under Apache-2.0. It runs without us.
  69. ### How Wren compares
  70. | | A raw LLM agent | A traditional BI tool | A bare semantic layer | **WrenAI** |
  71. |---|:---:|:---:|:---:|:---:|
  72. | Writes SQL for you | ✅ (often wrong) | ❌ | ❌ | ✅ governed |
  73. | Knows your business definitions | ❌ | partial, in-tool | ✅ (schema only) | ✅ + non-schema knowledge |
  74. | Generates & deploys dashboards | ❌ | ✅ (manual, in-tool) | ❌ | ✅ agent-driven |
  75. | Works through *your* agents (Claude Code, Cursor, MCP…) | ✅ | ❌ | ❌ | ✅ |
  76. | Open, reviewable, Git-friendly context | ❌ | ❌ | partial | ✅ |
  77. | Governed execution across 22+ sources | ❌ | per-connector | ✅ (definitions only) | ✅ |
  78. ### Wren is for you if…
  79. - You want **AI agents to produce trustworthy BI**, answers *and* dashboards, not just plausible SQL.
  80. - Your business logic (definitions, enums, units, approved joins) lives **outside the database** and your agents keep getting it wrong.
  81. - You want a context layer that is **open, reviewable, and version-controlled**, usable by every agent and every person, not gated behind one vendor's UI.
  82. **Skip Wren if** you only need a one-off chart from a single CSV, or you're happy letting an agent guess at SQL with no governance.
  83. ## Take it to your team with `git push`
  84. Everything Wren writes on your laptop is plain YAML and Markdown in a repo you own. **Git Sync** turns that same repo into a governed, team-wide GenBI deployment in Wren Cloud or a self-hosted installation, including air-gapped. Nothing to export, nothing to re-model.
  85. - **No new CLI to learn.** Bind a directory once with `wren cloud create` or `wren cloud link`. After that, `git push` and `git pull` are the entire interface.
  86. - **Metrics reviewed like code.** A change to `net_revenue` shows up as a readable diff in a pull request on GitHub, GitLab, Bitbucket, or your own remote. Run CI on it. Promote staging to production like application code.
  87. - **You keep the repo, always.** Clone it, back it up, feed it to another tool, or leave with it, any time.
  88. - **No reusable credential on disk.** Every push authenticates with a fresh token that expires in 600 seconds. The durable key stays in `~/.wren/cloud.yml` (mode `0600`) and is never handed to git.
  89. ```bash
  90. $ git push
  91. To cloud.getwren.ai/acme/wren-analytics.git
  92. 9f2c1a4..b71e0d3 main -> main
  93. ✔ deploy queued · model queryable in Wren Cloud
  94. ```
  95. <div align="center">
  96. **[See how Git Sync works →](https://www.getwren.ai/git-sync)** &nbsp;·&nbsp; [CLI reference: `wren cloud`](./docs/core/reference/cli.md#wren-cloud--connect-a-project-to-wren-cloud)
  97. </div>
  98. ### Open core: what's OSS, what's commercial
  99. The engine in this repo (MDL semantic layer, governed text-to-SQL, MCP server, CLI, 22+ connectors) is Apache-2.0, free forever, and self-hostable. The following are commercial, delivered as **Wren AI Cloud** or self-hosted **Enterprise Plus**:
  100. - **Row- and column-level security** and access control with users and groups
  101. - **GenBI UI, dashboards, embedded and APIs**
  102. - **Scenario AI harnesses**: GenBI Apps, Agentic Mode, AI-assisted context preparation
  103. - **Advanced security and audit, support and SLAs**, plus cloud, VPC, and air-gapped deployment
  104. Same engine underneath. Your MDL stays in your Git either way. **[Read the published boundary →](https://www.getwren.ai/en/open-core)**
  105. ## Under the hood
  106. ### Semantic layer (MDL)
  107. Wren **is** a governed semantic layer, expressed in the **Modeling Definition Language (MDL)**: a Git-friendly definition of what your data *means*, not just where it lives. Every answer and dashboard is planned against it.
  108. - **Models, columns, relationships, views**: the shape of your data, decoupled from any one warehouse.
  109. - **Cubes and metrics**: approved, reusable definitions so "revenue" means the same thing everywhere.
  110. - **Context beyond the schema**: enums, units, approved joins, and definitions in `instructions.md` and `queries.yml`.
  111. ### What's included
  112. - **Engine**: Apache DataFusion based. BigQuery, Snowflake, PostgreSQL, ClickHouse, Amazon Redshift, Databricks, DuckDB, and more. [Connect a database →](https://docs.getwren.ai/oss/guides/connect)
  113. - **GenBI dashboards**: agent-built, browser-side apps powered by [`wren-core-wasm`](https://docs.getwren.ai/oss/sdk/wasm), deployable to Vercel or Cloudflare Pages
  114. - **Knowledge and memory**: version-controlled `instructions.md` and `queries.yml`, plus a local LanceDB memory index with hybrid retrieval
  115. - **Agent SDKs**: `wren-langchain` (LangChain / LangGraph), `wren-pydantic`, and a reference Python integration for other stacks. [SDK overview →](https://docs.getwren.ai/oss/sdk/overview)
  116. - **Governed execution primitives**: functions, dry-plan validation, row limits, structured errors
  117. ### Day-to-day commands
  118. ```bash
  119. wren skills get onboarding # workflow guide: set up project + first query
  120. wren skills get enrich-context # workflow guide: add business context
  121. wren skills get genbi # workflow guide: build & deploy a dashboard
  122. wren query --sql '...' # query through the MDL semantic layer
  123. wren ask "<question>" --guided # wrap a question for a weaker agent
  124. wren ask "<question>" --direct # wrap a question for a stronger agent
  125. ```
  126. Full reference: [CLI](./docs/core/reference/cli.md) · [MDL](./docs/core/reference/mdl.md) · [Architecture](./docs/core/reference/architecture.md)
  127. ### What's next
  128. - **End-to-end correctness primitives**: value profiling, rich retrieval, structured errors, golden eval runner
  129. - **Agent-native distribution**: first-class SDKs across major agent frameworks
  130. Vote on what ships next in [GitHub Discussions →](https://github.com/Canner/WrenAI/discussions)
  131. ## FAQ
  132. <details>
  133. <summary><b>What is generative BI (GenBI)?</b></summary>
  134. Business intelligence produced by AI agents. Instead of a person building charts by hand, an agent generates governed SQL, deploys a dashboard, and shares it, grounded in an AI context layer so the output is trustworthy rather than merely plausible. Wren AI is the open-source GenBI engine.
  135. </details>
  136. <details>
  137. <summary><b>Does Wren AI do text-to-SQL?</b></summary>
  138. Yes, and governed: questions become SQL planned against your semantic layer (MDL) and dry-plan validated before execution. Wren then goes further, deploying dashboards and managing the context that keeps answers correct.
  139. </details>
  140. <details>
  141. <summary><b>Is Wren AI a semantic layer?</b></summary>
  142. Yes. Wren is a governed semantic layer expressed in MDL (models, metrics, relationships), paired with an AI context layer (memory, examples, unstructured knowledge) and a governed execution engine that runs those definitions across 22+ sources.
  143. </details>
  144. <details>
  145. <summary><b>What is an AI context layer?</b></summary>
  146. The reviewable, version-controlled knowledge agents need but schemas don't provide: business semantics, approved definitions, examples, memory, and governance. Read the vision: [The missing context layer for AI agents over business data](https://www.getwren.ai/post/the-missing-context-layer-for-ai-agents-over-business-data).
  147. </details>
  148. <details>
  149. <summary><b>What happened to the Docker-based Wren AI GenBI app?</b></summary>
  150. On 2026-05-07 Wren Engine merged into this repo under [`core/`](./core), and the previous `Canner/wren-engine` repo was archived. The earlier chat-first BI product is now **Wren GenBI Classic**, preserved on the [`legacy/v1`](https://github.com/Canner/WrenAI/tree/legacy/v1) branch (tag `v1-final`) with no new features or security fixes. For a maintained, hosted version of that experience, see [Wren AI Commercial](https://getwren.ai). [Read the announcement →](https://github.com/Canner/WrenAI/discussions/2205)
  151. </details>
  152. ## Documentation
  153. - [Quickstart](https://docs.getwren.ai/oss/get_started/quickstart): from skill install to first answer
  154. - [Build & deploy a GenBI app](https://docs.getwren.ai/oss/guides/genbi): generate a dashboard and ship it
  155. - [Concepts](https://docs.getwren.ai/oss/concepts/what_is_context): what context is, what MDL is, how memory works
  156. - [Connect a database](https://docs.getwren.ai/oss/guides/connect): Postgres, BigQuery, Snowflake, DuckDB, and more
  157. - [Agent SDKs](https://docs.getwren.ai/oss/sdk/overview): what's shipping today, what's next
  158. - [Git Sync](https://www.getwren.ai/git-sync): `git push` your open-source project to governed, team-wide GenBI
  159. ## Community
  160. - 💬 [Discord](https://discord.gg/5DvshJqG8Z): get unstuck fast, chat with the team and other builders
  161. - 🐙 [GitHub Discussions](https://github.com/Canner/WrenAI/discussions): design conversations, RFCs, roadmap votes
  162. - 🐦 [Twitter / X](https://x.com/getwrenai): release notes and short updates
  163. - 🗞 [Blog](https://www.getwren.ai/blog): vision, post-mortems, deep dives
  164. ## Contributing
  165. We build in the open. Issues, PRs, connectors, SDK integrations, and docs fixes are all welcome.
  166. - **New here?** Pick up a [`good first issue`](https://github.com/Canner/WrenAI/labels/good%20first%20issue).
  167. - [Contributor guide](./CONTRIBUTING.md): setup, conventions, and the contribution bar
  168. - [Architecture map](./docs/core/reference/architecture.md): find the right place to land your change
  169. <details>
  170. <summary><b>Project structure (click to expand)</b></summary>
  171. ```
  172. core/
  173. wren-core/ Rust semantic engine (Apache DataFusion)
  174. wren-core-base/ Shared manifest types + MDL builder
  175. wren-core-py/ Python bindings (PyPI: wren-core)
  176. wren-core-wasm/ WebAssembly build (npm: wren-core-wasm)
  177. wren/ Python SDK and CLI (PyPI: wrenai)
  178. wren-mdl/ MDL JSON schema
  179. sdk/
  180. wren-langchain/ LangChain / LangGraph integration
  181. wren-pydantic/ Pydantic AI integration
  182. skills/ Agent skills for context authoring
  183. docs/ Module documentation
  184. examples/ Example projects
  185. ```
  186. </details>
  187. ## Contributors
  188. <a href="https://github.com/Canner/WrenAI/graphs/contributors">
  189. <img src="https://contrib.rocks/image?repo=Canner/WrenAI" alt="WrenAI contributors" />
  190. </a>
  191. ## License
  192. Apache 2.0. See [LICENSE](./LICENSE).
  193. ---
  194. <div align="center">
  195. **If WrenAI saved you time, [star the repo](https://github.com/Canner/WrenAI) ⭐. It's the fastest way to help more agent builders find it.**
  196. **[Get started ↑](#quickstart)** &nbsp;·&nbsp; **[Join Discord →](https://discord.gg/5DvshJqG8Z)** &nbsp;·&nbsp; **[See Git Sync →](https://www.getwren.ai/git-sync)**
  197. <p><a href="#top">⬆️ Back to top</a></p>
  198. </div>
skills/install.sh · Bundled script · 69 lines · 2 findings marked
  1. #!/usr/bin/env bash
  2. # Install the Wren AI agent skill discovery stub into your local AI client.
  3. #
  4. # The actual skill content lives inside the `wren` CLI itself
  5. # (`pip install wrenai`). This script installs the discovery stub (`wren`)
  6. # that points an AI client at the CLI; from then on the agent fetches
  7. # everything else via `wren skills get` / `wren ask`.
  8. #
  9. # Usage:
  10. # ./install.sh # install the discovery stub
  11. # ./install.sh --force # overwrite an existing install
  12. # curl -fsSL https://raw.githubusercontent.com/Canner/WrenAI/main/skills/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 12 on GitHub
  13. set -euo pipefail
  14. REPO="Canner/WrenAI"
  15. BRANCH="${WREN_SKILLS_BRANCH:-main}"
  16. DEST="${CLAUDE_SKILLS_DIR:-$HOME/.claude/skills}"
  17. SKILL="wren"
  18. FORCE=false
  19. for arg in "$@"; do
  20. case "$arg" in
  21. --force) FORCE=true ;;
  22. *) echo "Unknown argument: $arg" >&2; exit 1 ;;
  23. esac
  24. done
  25. # Detect whether we are running from a local clone or piped via curl.
  26. SCRIPT_DIR=""
  27. if [ -n "${BASH_SOURCE[0]:-}" ] && [ "${BASH_SOURCE[0]}" != "/dev/stdin" ]; then
  28. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  29. fi
  30. install_skill() {
  31. local src="$1" dest_dir="$2"
  32. if [ "$FORCE" = false ] && [ -d "$dest_dir" ]; then
  33. echo " Skipping $SKILL (already exists). Use --force to overwrite."
  34. return
  35. fi
  36. rm -rf "$dest_dir"
  37. cp -r "$src" "$dest_dir"
  38. echo " Installed $SKILL"
  39. }
  40. mkdir -p "$DEST"
  41. if [ -n "$SCRIPT_DIR" ] && [ -d "$SCRIPT_DIR/$SKILL" ]; then
  42. echo "Installing from local repo: $SCRIPT_DIR"
  43. echo "Destination: $DEST"
  44. echo ""
  45. install_skill "$SCRIPT_DIR/$SKILL" "$DEST/$SKILL"
  46. else
  47. echo "Downloading skill from GitHub ($REPO @ $BRANCH)..."
  48. echo "Destination: $DEST"
  49. echo ""
  50. tmpdir=$(mktemp -d)
  51. trap 'rm -rf "$tmpdir"' EXIT
  52. curl -fsSL "https://github.com/$REPO/archive/refs/heads/$BRANCH.tar.gz" \
  53. | tar -xz -C "$tmpdir" --strip-components=2 "WrenAI-${BRANCH}/skills/${SKILL}"
  54. install_skill "$tmpdir/$SKILL" "$DEST/$SKILL"
  55. fi
  56. echo ""
  57. echo "Done. Invoke the skill in your AI client:"
  58. echo " /$SKILL"
  59. echo ""
  60. echo "To update later, re-run with --force:"
  61. echo " curl -fsSL https://raw.githubusercontent.com/Canner/WrenAI/main/skills/install.sh | bash -s -- --force"
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 69 on GitHub

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.