WrenAI

Canner活跃维护

开源的生成式 BI 工具,通过开放上下文层把自然语言问题转成可信的 SQL、图表和看板,支持 BigQuery、Snowflake 等 20 多种数据源。

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.

wren-v0.17.1发布于 2026-10-30 02:01 UTC18,118star +14 / 7 天2,087fork同步于 2026-11-10 05:23 UTC

怎么上手

由 README 提炼,执行前请确认
pip install wrenai
npx skills add Canner/WrenAI
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源 GenBI 引擎,给 AI agent 加语义层,把自然语言问题变成可信 SQL 和仪表盘

开源的生成式 BI 工具,通过开放上下文层把自然语言问题转成可信的 SQL、图表和看板,支持 BigQuery、Snowflake 等 20 多种数据源。

核心能力

  • 用 MDL 语义层定义模型、指标和关系,统一业务口径
  • 通过 dry-plan 校验、行数限制和结构化错误约束 agent 生成的 SQL
  • 业务定义以 YAML 和 Markdown 存入 Git,可评审可 diff
  • 基于 Apache DataFusion 引擎连接 22+ 数据源
  • agent 生成浏览器端仪表盘并可部署到 Vercel 或 Cloudflare Pages

容易踩的坑

连接器需按需安装 extras,如 pip install "wrenai[postgres,memory]";HuggingFace 模型下载超时需先设置 HF_ENDPOINT=https://hf-mirror.com;行级列级权限、GenBI UI 等属商业版,不在开源仓库内

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本wren-v0.17.1
  1. wren-v0.17.1wren: v0.17.1最新正式版2026-10-30 · 2026-10-30 02:01 UTC

    0.17.1 (2026-10-30)

    Bug Fixes

    • core: use to_arrow_table for DuckDB 2.0 compatibility (#2842) (6c48e83)
  2. wren-v0.17.0wren: v0.17.02026-10-27 · 2026-10-27 03:02 UTC
    查看更新说明

    0.17.0 (2026-10-23)

    Features

    • wren: add wren context export-ossie and follow the OSI → Apache Ossie rename (#2806) (3a5cac4)
    • wren: add wren context import ossie and wren context export ossie (#2821) (190ed1e)
    • wren: import a Wren project from an OpenMetadata catalog (#2807) (3eecec4)

    Bug Fixes

    • constrain MCP SDK to the supported major version (#2810) (0ff9382)
    • preserve dbt tests and relationships for quoted columns (#2811) (aa9432e)
    • wren: bump certifi to 2026.10.19 (GHSA-6q48-6c7w-9gw2) (#2824) (9868d0c)
    • wren: keep just test collecting without the postgres extra (#2801) (5a287c5)
    • wren: keep dates and integers intact in --output json (#2805) (54941db)
    • wren: make an Ossie file that converts cleanly also validate, build and query (#2823) (8400453)
    • wren: resolve model aliases within SQL query scopes (#2798) (b04ac03)
    • wren: serialize shared DuckDB connection access (#2797) (3e82da3)
    • wren: translate dialect-neutral SQL that ClickHouse rejects or misreads (#2783) (6975f82)
  3. wren-core-py-v0.8.2wren-core-py: v0.8.22026-10-23 · 2026-10-23 09:12 UTC
    查看更新说明

    0.8.2 (2026-10-23)

    Bug Fixes

    • core-py: ship the wren-core 0.5.1 DISTINCT ON fix in the bindings (#2828) (17f7ed9)
  4. wren-semantic-core-v0.5.1wren-semantic-core: v0.5.12026-10-23 · 2026-10-23 08:26 UTC
    查看更新说明

    0.5.1 (2026-10-23)

    Bug Fixes

    • core: collect DISTINCT ON columns when building model plans (#2815) (f618d8d)
    • wren-core: preserve SQL literals when resolving derived cube measures (#2813) (a53c3cb)
  5. wren-manifest-macro-v0.5.1wren-manifest-macro: v0.5.12026-10-23 · 2026-10-23 08:26 UTC
    查看更新说明

    0.5.1 (2026-10-23)

    Miscellaneous Chores

    • wren-manifest-macro: Synchronize wren-rust-core versions

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    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 →

    License: Apache 2.0 PyPI GitHub Release Discord Follow on X 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

    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.

    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:

    BeatAsk your agentWhat 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 errors with hints keep agent SQL inside guardrails.
    • 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.
    • 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.
    • Sits on your existing stack. Warehouse, transformation pipelines, existing semantic models. 22+ sources on one Apache DataFusion engine.
    • Open by default. Core engine, SDK, and skills under Apache-2.0. It runs without us.

    How Wren compares

    A raw LLM agentA traditional BI toolA bare semantic layerWrenAI
    Writes SQL for you✅ (often wrong)❌❌✅ governed
    Knows your business definitions❌partial, in-tool✅ (schema only)✅ + non-schema knowledge
    Generates & deploys dashboards❌✅ (manual, in-tool)❌✅ agent-driven
    Works through your agents (Claude Code, Cursor, MCP…)✅❌❌✅
    Open, reviewable, Git-friendly context❌❌partial✅
    Governed execution across 22+ sources❌per-connector✅ (definitions only)✅

    Wren is for you if…

    • You want AI agents to produce trustworthy BI, answers and dashboards, not just plausible SQL.
    • Your business logic (definitions, enums, units, approved joins) lives outside the database and your agents keep getting it wrong.
    • 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.

    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.

    Take it to your team with git push

    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.

    • 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.
    • 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.
    • You keep the repo, always. Clone it, back it up, feed it to another tool, or leave with it, any time.
    • 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.
    $ git push
    To cloud.getwren.ai/acme/wren-analytics.git
       9f2c1a4..b71e0d3  main -> main
    ✔ deploy queued · model queryable in Wren Cloud
    

    See how Git Sync works →  ·  CLI reference: wren cloud

    Open core: what's OSS, what's commercial

    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:

    • Row- and column-level security and access control with users and groups
    • GenBI UI, dashboards, embedded and APIs
    • Scenario AI harnesses: GenBI Apps, Agentic Mode, AI-assisted context preparation
    • Advanced security and audit, support and SLAs, plus cloud, VPC, and air-gapped deployment

    Same engine underneath. Your MDL stays in your Git either way. Read the published boundary →

    Under the hood

    Semantic layer (MDL)

    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.

    • Models, columns, relationships, views: the shape of your data, decoupled from any one warehouse.
    • Cubes and metrics: approved, reusable definitions so "revenue" means the same thing everywhere.
    • Context beyond the schema: enums, units, approved joins, and definitions in instructions.md and queries.yml.

    What's included

    • Engine: Apache DataFusion based. BigQuery, Snowflake, PostgreSQL, ClickHouse, Amazon Redshift, Databricks, DuckDB, and more. Connect a database →
    • GenBI dashboards: agent-built, browser-side apps powered by wren-core-wasm, deployable to Vercel or Cloudflare Pages
    • Knowledge and memory: version-controlled instructions.md and queries.yml, plus a local LanceDB memory index with hybrid retrieval
    • Agent SDKs: wren-langchain (LangChain / LangGraph), wren-pydantic, and a reference Python integration for other stacks. SDK overview →
    • Governed execution primitives: functions, dry-plan validation, row limits, structured errors

    Day-to-day commands

    wren skills get onboarding         # workflow guide: set up project + first query
    wren skills get enrich-context     # workflow guide: add business context
    wren skills get genbi              # workflow guide: build & deploy a dashboard
    
    wren query --sql '...'             # query through the MDL semantic layer
    wren ask "<question>" --guided     # wrap a question for a weaker agent
    wren ask "<question>" --direct     # wrap a question for a stronger agent
    

    Full reference: CLI · MDL · Architecture

    What's next

    • End-to-end correctness primitives: value profiling, rich retrieval, structured errors, golden eval runner
    • Agent-native distribution: first-class SDKs across major agent frameworks

    Vote on what ships next in GitHub Discussions →

    FAQ

    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.

    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.

    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.

    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.

    On 2026-05-07 Wren Engine merged into this repo under 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 branch (tag v1-final) with no new features or security fixes. For a maintained, hosted version of that experience, see Wren AI Commercial. Read the announcement →

    Documentation

    Community

    • 💬 Discord: get unstuck fast, chat with the team and other builders
    • 🐙 GitHub Discussions: design conversations, RFCs, roadmap votes
    • 🐦 Twitter / X: release notes and short updates
    • 🗞 Blog: vision, post-mortems, deep dives

    Contributing

    We build in the open. Issues, PRs, connectors, SDK integrations, and docs fixes are all welcome.

    core/
      wren-core/         Rust semantic engine (Apache DataFusion)
      wren-core-base/    Shared manifest types + MDL builder
      wren-core-py/      Python bindings (PyPI: wren-core)
      wren-core-wasm/    WebAssembly build (npm: wren-core-wasm)
      wren/              Python SDK and CLI (PyPI: wrenai)
      wren-mdl/          MDL JSON schema
    sdk/
      wren-langchain/    LangChain / LangGraph integration
      wren-pydantic/     Pydantic AI integration
    skills/              Agent skills for context authoring
    docs/                Module documentation
    examples/            Example projects
    

    Contributors

    License

    Apache 2.0. See LICENSE.


    If WrenAI saved you time, star the repo ⭐. It's the fastest way to help more agent builders find it.

    Get started ↑  ·  Join Discord →  ·  See Git Sync →