diff --git a/README.md b/README.md index 78b82d83b..d6e024d56 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,17 @@ + + ### Open-source GenBI: generative BI for AI agents. *Your agents generate, deploy, and govern dashboards from any database, grounded in a context layer they can actually trust.* +**Wren AI is an open-source generative BI (GenBI) engine โ€” a governed text-to-SQL and semantic-layer platform, powered by an open AI context layer, across 22+ data sources.** + [Docs](https://docs.getwren.ai) ยท [Discord](https://discord.gg/5DvshJqG8Z) ยท [Vision](https://www.getwren.ai/post/the-missing-context-layer-for-ai-agents-over-business-data) ยท [Blog](https://www.getwren.ai/blog) -[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) +[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/Canner/WrenAI/blob/main/LICENSE) [![PyPI](https://img.shields.io/pypi/v/wrenai?label=wrenai)](https://pypi.org/project/wrenai/) [![GitHub Release](https://img.shields.io/github/v/release/Canner/WrenAI?logo=github&label=release)](https://github.com/Canner/WrenAI/releases) [![Discord](https://img.shields.io/discord/1227143286951514152?logo=discord&label=Discord)](https://discord.gg/5DvshJqG8Z) @@ -27,41 +31,29 @@ > ๐Ÿ“ฃ **2026-05-07**: Wren Engine has merged into this repo under [`core/`](./core). The previous `Canner/wren-engine` repo is archived. The previous WrenAI GenBI app (the Docker-based chat-first BI product) is preserved on the [`legacy/v1`](https://github.com/Canner/WrenAI/tree/legacy/v1) branch (tag `v1-final`) and is now **Wren GenBI Classic**; see [A note on the "GenBI" name](#a-note-on-the-genbi-name) below. [Read the announcement โ†’](https://github.com/Canner/WrenAI/discussions/2205) - - --- ## What WrenAI is -WrenAI is the **open-source GenBI engine**: it lets AI agents **generate, deploy, and govern** business intelligence, from a SQL answer to a shareable dashboard, across 22+ data sources. +WrenAI is the **open-source generative BI (GenBI) engine**: it lets AI agents **generate, deploy, and govern** business intelligence, from a governed **text-to-SQL** answer to a shareable dashboard, across 22+ data sources. -What makes the output trustworthy is the layer underneath: an open **context layer** that gives agents what schemas don't. That means business semantics, approved definitions, examples, memory, and governance, plus the unstructured company knowledge that lives in your docs, wikis, and chat threads. Generative BI is only as good as the context it stands on, and Wren is that context, made reviewable and reusable by every agent you already run. +What makes the output trustworthy is the layer underneath: an open **AI context layer** plus a governed **semantic layer (MDL)** that gives agents what schemas don't. That means business semantics, approved definitions, examples, memory, and governance, plus the unstructured company knowledge that lives in your docs, wikis, and chat threads. Generative BI is only as good as the context it stands on, and Wren is that context, made reviewable and reusable by every agent you already run. -![Wren AI architecture](./misc/wren-ai-architecture.png) +![Wren AI generative BI architecture โ€” semantic layer and AI context layer for AI agents](./misc/wren-ai-architecture.png) ## GenBI in three beats: Generate ยท Deploy ยท Know -- **Generate.** Your agent turns a business question into *governed* SQL and charts. Schema-aware retrieval, MDL planning, dry-plan validation, and structured errors keep it correct instead of confidently wrong. +- **Generate.** Your agent turns a business question into *governed* **text-to-SQL** and charts. Schema-aware retrieval, MDL planning, dry-plan validation, and structured errors keep it correct instead of confidently wrong. - **Deploy.** Turn any answer into a shareable, browser-side dashboard powered by [`wren-core-wasm`](https://docs.getwren.ai/oss/sdk/wasm) and ship it to your own Vercel or Cloudflare Pages account with one command. - **Know.** The knowledge that makes all of this correct lives in versionable, evidence-linked files: semantic models (MDL), company definitions (`instructions.md`), and a memory of what worked. Reviewable. Git-friendly. Never locked inside someone else's UI. ## Why agent builders pick WrenAI -- **Generative BI, end to end.** Not just text-to-SQL. Generate the answer, deploy the dashboard, share the URL, all driven by the agents you already use. -- **Knowledge management built in.** Business meaning, approved definitions, and proven examples are captured as reviewable, version-controlled context, not buried in prompts. +- **Generative BI, end to end.** Wren does **governed text-to-SQL** โ€” and goes beyond it: generate the answer, deploy the dashboard, share the URL, all driven by the agents you already use. +- **Knowledge management built in.** Business meaning, approved definitions, and proven examples are captured as a reviewable, version-controlled **semantic layer (MDL)**, not buried in prompts. - **Open by default.** Open-sourced core, SDK, and skills under the Apache-2.0 license. - **Correctness as primitives.** Rich schema retrieval, dry-plan validation, structured errors with hints, value profiling, eval runner. The agent orchestrates; the trace lives in its reasoning. +- **Governed execution, reviewable context.** Dry-plan validation, row limits, and structured errors keep agent-generated SQL inside guardrails, and every definition and example lives in Git โ€” reviewable, versioned, diff-able. (Row/column-level security and access control are Cloud / self-hosted โ€” see [Open core: OSS vs. Cloud / self-hosted](#open-core-oss-vs-cloud--self-hosted).) - **Sits on top of your existing stack.** Warehouse, transformation pipelines, your existing semantic layer. Not another tool to maintain. ## How Wren compares @@ -79,7 +71,7 @@ What makes the output trustworthy is the layer underneath: an open **context lay - 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 context that's **open, reviewable, and version-controlled**, usable by every agent and person, not gated behind one vendor's UI. +- You want an **AI context layer** and **semantic layer** that are **open, reviewable, and version-controlled**, usable by every agent and 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. @@ -170,23 +162,73 @@ wren ask "" --direct # wrap a question for a stronger agent Fast at first. Deep when you need it. Always reviewable and Git-friendly. +## Semantic layer (MDL) + +Wren **is** a governed semantic layer, expressed in the **Modeling Definition Language (MDL)** โ€” a Git-friendly, reviewable definition of what your data *means*, not just where it lives. Every text-to-SQL answer and dashboard is planned against it, so agents inherit your business truth instead of guessing. + +MDL covers: + +- **Models, columns, relationships, and views** โ€” the shape of your data, decoupled from any one warehouse. +- **Cubes and metrics** โ€” approved, reusable definitions so "revenue" means the same thing everywhere. +- **Business context beyond the schema** โ€” enums, units, approved joins, and definitions in version-controlled `instructions.md` and `queries.yml`. + +Unlike a bare semantic layer that only stores definitions, Wren pairs the semantic layer with an **AI context layer** โ€” memory, examples, and unstructured company knowledge โ€” and a governed execution engine, so the same definitions that describe your data also *run* it correctly across 22+ sources. + ## What's Included -- **Modeling Definition Language (MDL)**: models, columns, relationships, views, cubes, metrics, row-level / column-level access control (RLAC / CLAC) -- **Engine**: Apache DataFusion based, 22+ data sources +- **Modeling Definition Language (MDL) โ€” the semantic layer**: models, columns, relationships, views, cubes, metrics +- **Engine**: Apache DataFusion based, 22+ data sources (BigQuery, Snowflake, PostgreSQL, ClickHouse, Amazon Redshift, Databricks, DuckDB, and more) - **GenBI dashboards**: agent-built, browser-side apps powered by [`wren-core-wasm`](https://docs.getwren.ai/oss/sdk/wasm), deployable to Vercel / Cloudflare Pages -- **Knowledge & memory**: business meaning in version-controlled `instructions.md` and `queries.yml`, plus a local LanceDB memory index (hybrid retrieval) for recall +- **Knowledge & memory โ€” the AI context layer**: business meaning in version-controlled `instructions.md` and `queries.yml`, plus a local LanceDB memory index (hybrid retrieval) for recall - **Agent SDK**: `wren-langchain` (LangChain / LangGraph), `wren-pydantic`; reference Python integration for other stacks -- **Governed execution primitives**: functions, dry-plan, row limits, access control +- **Governed execution primitives**: functions, dry-plan, row limits, structured errors ## 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; see [GitHub Discussions](https://github.com/Canner/WrenAI/discussions) for what's prioritized next -- **Full governed execution**: audit logs, rate limits, approval workflow, data-flow inspector Full roadmap and design notes: see the [introduction](https://docs.getwren.ai/oss/introduction). +## FAQ + +### What is generative BI (GenBI)? + +Generative BI (GenBI) is business intelligence produced by AI agents: instead of manually building charts, an agent generates governed SQL, deploys a dashboard, and shares it โ€” grounded in an AI context layer so the output is trustworthy, not just plausible. Wren AI is the open-source GenBI engine. + +### Does Wren AI do text-to-SQL? + +Yes โ€” Wren does **governed** text-to-SQL: agents turn natural-language questions into SQL that's planned against your semantic layer (MDL) and dry-plan validated. It then goes beyond text-to-SQL to deploy dashboards and manage the context that keeps answers correct. + +### Is Wren AI a semantic layer? + +Yes. Wren is a governed semantic layer expressed in MDL โ€” models, metrics, and relationships โ€” and it pairs that semantic layer with an AI context layer (memory, examples, unstructured knowledge) so agents inherit your business definitions. + +### What is an AI context layer? + +An AI context layer is the reviewable, version-controlled knowledge that agents need but schemas don't provide: business semantics, approved definitions, examples, memory, and governance. It's what makes generative BI trustworthy. 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). + +### What's in OSS vs. Wren AI Cloud / self-hosted? + +The open-source engine in this repo โ€” MDL semantic layer, governed text-to-SQL, MCP server, CLI, and 22+ connectors โ€” is free forever and self-hostable under Apache-2.0. Row- and column-level security, access control with users and groups, the GenBI UI and dashboards, GenBI Apps, agentic mode, context preparation, and support/SLAs are commercial, delivered as Wren AI Cloud or self-hosted Enterprise Plus. The boundary is published: [Open core โ€” what's OSS vs. commercial](https://www.getwren.ai/en/open-core). + +### Which data sources does Wren AI support? + +22+ sources via an Apache DataFusion engine, including BigQuery, Snowflake, PostgreSQL, ClickHouse, Amazon Redshift, Databricks, and DuckDB. See [Connect a database](https://docs.getwren.ai/oss/guides/connect). + +## Open core: OSS vs. Cloud / self-hosted + +Wren AI is **open core**. The context engine in this repo โ€” MDL semantic layer, governed text-to-SQL, MCP server, CLI, and 22+ connectors โ€” is open source under Apache-2.0, free forever, and self-hostable. It runs without us. + +The following are **commercial**, delivered as **Wren AI Cloud** or self-hosted **Enterprise Plus**: + +- **Row- and column-level security (RLS / CLS)** and access control with users & groups +- **GenBI UI, dashboards, embedded & APIs** +- **Scenario AI harnesses** โ€” GenBI Apps, Agentic Mode, AI-assisted context preparation +- **Advanced security & audit, support & SLAs**, plus cloud / VPC / air-gapped deployment + +Same engine underneath, and your MDL stays in your git either way. The full boundary is published โ€” see **[Open core: what's OSS vs. commercial โ†’](https://www.getwren.ai/en/open-core)**. + ## A note on the "GenBI" name "GenBI" now refers to this open-source generative-BI capability: agents that @@ -222,7 +264,7 @@ We build in the open. Issues, PRs, connector contributions, SDK integrations, do - Looking for somewhere to start? Try the [`good first issue`](https://github.com/Canner/WrenAI/labels/good%20first%20issue) label.
-Project structure (click to expand) +Project structure (click to expand) ``` core/