Open Source
Explore the latest AI open-source projects from GitHub and HuggingFace.
Explore the latest AI open-source projects from GitHub and HuggingFace.
WrenAI is an open-source generative business intelligence (GenBI) engine built by Canner that turns natural-language questions into governed SQL, charts, and dashboards. With 16,000+ GitHub stars, it targets a specific and stubborn problem: letting AI agents query enterprise data reliably, without hallucinated joins or ungoverned access to raw tables. ## The Problem It Addresses Text-to-SQL demos have existed for years, but production adoption tends to stall on trust. A language model pointed directly at a warehouse schema will guess at column meanings, invent relationships, and produce queries that run cleanly yet return the wrong numbers. For business intelligence, a confidently wrong answer is worse than no answer. WrenAI's response is to insert a reviewable context layer between the model and the database, so generated SQL is grounded in approved business definitions rather than raw schema alone. ## The Context Layer and MDL The core of WrenAI is a version-controlled context layer that stores business semantics: metric definitions, model relationships, curated example questions, and governance rules. These are expressed through MDL (Modeling Definition Language), a structured format for declaring models, columns, relationships, metrics, and access controls such as row-level and column-level access control (RLAC/CLAC). Because MDL lives in the repository rather than inside the database, teams can review changes through normal pull-request workflows and keep an audit trail of how definitions evolve over time. This turns semantic modeling into a governed, collaborative artifact instead of tribal knowledge scattered across analysts. ## Semantic Engine on Apache DataFusion Query planning, validation, and execution run through a semantic engine built on Apache DataFusion in Rust. WrenAI performs a dry-plan validation step that checks a query for correctness before execution, catching malformed or unauthorized queries early rather than at runtime. Retrieval is hybrid: schema-aware retrieval is combined with knowledge-base retrieval backed by LanceDB, so the system pulls both structural and business context when constructing a query. ## Agent-Driven by Design Rather than shipping a single fixed chat interface, WrenAI is positioned as infrastructure that AI agents orchestrate. It provides CLI tooling and workflow guides that agents such as Claude Code, Cursor, and Cline can drive, along with a wren-langchain SDK as a reference integration. The design deliberately avoids tight coupling to any single LLM provider. The agent controls prompting and reasoning, while WrenAI supplies the governed context, validation, and execution layer beneath it. ## Dashboards and Data Sources Generated answers can be deployed as shareable dashboards rendered browser-side through wren-core-wasm, which compiles to WebAssembly and can be hosted on platforms like Vercel or Cloudflare Pages. On the connectivity side, WrenAI reaches more than 20 data sources, including PostgreSQL, BigQuery, Snowflake, DuckDB, ClickHouse, Amazon Redshift, and Databricks, which covers most common analytics stacks. ## Usability in Practice For a team already running a modern warehouse, the main up-front investment is authoring MDL and curating the context layer. This is where accuracy actually comes from, and skipping it undermines the whole proposition. Once definitions exist, the workflow follows three beats: generate governed SQL from a business question, deploy the answer as a dashboard, and keep refining the reviewable context as the business changes. The agent-first posture means WrenAI slots most naturally into workflows that already use coding agents, and it is less convenient for a quick one-off analysis of an ad-hoc CSV. ## Pros and Cons On the plus side, the context layer is a genuine answer to the trust gap that blocks text-to-SQL in production, governance is built in rather than bolted on, and the Rust/DataFusion engine keeps validation fast. The provider-agnostic, agent-driven approach also future-proofs the tool as agent frameworks evolve. The trade-offs are real: value depends heavily on the quality of the MDL you write, the semantic modeling has a learning curve, and the multi-licensed repository (AGPL-3.0 for the application, Apache-2.0 for core components) requires attention before commercial redistribution. ## Outlook WrenAI reflects a broader shift in the BI space from natural-language novelty toward governed, auditable data access that organizations can actually deploy. As AI agents become the interface many teams use to interrogate data, a reviewable context layer that enforces definitions and access controls is likely to matter more, not less. Continued momentum on the repository, active data-source coverage, and the WebAssembly dashboard path all point toward a tool aimed at durable production use rather than demos. ## Conclusion WrenAI is a substantial, well-scoped project for teams that need AI agents to produce trustworthy BI outputs grounded in business definitions, with governance and auditability treated as first-class concerns. It is best suited to data teams with a real warehouse and a willingness to invest in semantic modeling, and less relevant for casual, ungoverned exploration. For organizations trying to move text-to-SQL past the demo stage, it is one of the more credible open-source options available today.