About this project
WrenAI is an open-source generative business intelligence (GenBI) engine designed to be used through AI agents rather than as a standalone chat UI. It provides a governed semantic layer (Modeling Definition Language, or MDL) and an AI context layer so agents such as Claude Code, Cursor, Cline, Codex, MCP clients, and LangChain/LangGraph applications can turn natural-language business questions into validated SQL, answers, and shareable dashboards within defined guardrails.
The MDL defines models, columns, relationships, views, cubes, metrics, enums, units, and approved joins as Git-friendly YAML and Markdown files, separating business meaning from any single warehouse. Additional context—instructions, worked query examples, and memory—lives in reviewable files (instructions.md, queries.yml) and a local LanceDB memory index with hybrid retrieval. Query planning is schema-aware and includes dry-plan validation, row limits, value profiling, and structured errors with hints.
The core engine is built in Rust on Apache DataFusion and ships with Python bindings, a WebAssembly build (wren-core-wasm) for browser-side dashboard apps, a Python SDK and CLI (the wrenai PyPI package), an MCP server, and integrations for LangChain/LangGraph (wren-langchain) and Pydantic AI (wren-pydantic). The README lists 22+ connectors, including BigQuery, Snowflake, PostgreSQL, ClickHouse, Amazon Redshift, Databricks, and DuckDB.
The advertised workflow has three stages: enrich a project with business context, generate governed SQL from questions executed via `wren query`, and deploy the result as a filterable dashboard to Vercel or Cloudflare Pages. Quickstart is three commands: install with pip (adding connector extras such as postgres or memory), run `npx skills add Canner/WrenAI` to install an agent discovery stub, then ask the agent to configure a database or use the bundled jaffle_shop sample. CLI skill guides cover onboarding, context enrichment, and GenBI app generation; `wren ask` offers guided and direct modes for weaker or stronger agents.
Git Sync lets a local Wren repository be bound to Wren Cloud or a self-hosted installation so git push/pull deploy team-wide models. Authentication uses short-lived tokens, while the durable key remains in ~/.wren/cloud.yml with 0600 permissions and is not handed to git.
The project follows an open-core model. The engine, MDL semantic layer, governed text-to-SQL, MCP server, CLI, SDKs, skills, and connectors are Apache-2.0 licensed and self-hostable, including air-gapped use. Commercial Wren AI Cloud and Enterprise Plus add row- and column-level security and access control, GenBI UI/dashboards/embedding/APIs, scenario AI harnesses (GenBI Apps, Agentic Mode, AI-assisted context preparation), advanced security and audit, support and SLAs, and cloud, VPC, or air-gapped deployment.
The README also notes a repository transition: on 2026-05-07 the Wren Engine merged into this repository under core/, the former Canner/wren-engine repository was archived, and the earlier chat-first product remains as Wren GenBI Classic on the legacy/v1 branch (tag v1-final) with no new features or security fixes. The repository layout includes the Rust core, Python bindings and CLI, MDL JSON schema, SDKs, agent skills, documentation, and example projects.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.