WrenAI is an open-source Generative Business Intelligence (GenBI) agent developed by Canner, designed to enable seamless, natural-language interaction with structured data. It targets both technical and non-technical teams, providing the tools to query, analyze, and visualize data without writing SQL. All capabilities and integrations are verified against the official documentation and latest releases.
Key Capabilities
- Natural Language to SQL:
Users can ask data questions in plain language (across multiple languages) and WrenAI translates these into accurate, production-grade SQL queries. This streamlines data access for non-technical users. - Multi-Modal Output:
The platform generates SQL, charts, summary reports, dashboards, and spreadsheets. Both textual and visual outputs (e.g., charts, tables) are available for immediate data presentation or operational reporting. - GenBI Insights:
WrenAI provides AI-generated summaries, reports, and context-aware visualizations, enabling quick, decision-ready analysis. - LLM Flexibility:
WrenAI supports a range of large language models, including:- OpenAI GPT series
- Azure OpenAI
- Google Gemini, Vertex AI
- DeepSeek
- Databricks
- AWS Bedrock (Anthropic Claude, Cohere, etc.)
- Groq
- Ollama (for deploying local or custom LLMs)
- Other OpenAI API-compatible and user-defined models.
- Semantic Layer & Indexing:
Uses a Modeling Definition Language (MDL) for encoding schema, metrics, joins, and definitions, giving LLMs precise context and reducing hallucinations. The semantic engine ensures context-rich queries, schema embeddings, and relevance-based retrieval for accurate SQL. - Export & Collaboration:
Results can be exported to Excel, Google Sheets, or APIs for further analysis or team sharing. - API Embeddability:
Query and visualization capabilities are accessible via API, enabling seamless embedding in custom apps and frontends.
Architecture Overview
WrenAI’s architecture is modular and highly extensible for robust deployment and integration:
| Component | Description |
|---|---|
| User Interface | Web-based or CLI UI for natural language queries and data visualization. |
| Orchestration Layer | Handles input parsing, manages LLM selection, and coordinates query execution. |
| Semantic Indexing | Embeds database schema and metadata, providing crucial context for the LLM. |
| LLM Abstraction | Unified API for integrating multiple LLM providers, both cloud and local. |
| Query Engine | Executes generated SQL on supported databases/data warehouses. |
| Visualization | Renders tables, charts, dashboards, and exports results as needed. |
| Plugins/Extensibility | Allows custom connectors, templates, prompt logic, and integrations for domain-specific needs. |

Semantic Engine Details
- Schema Embeddings:
Dense vector representations capture schema and business context, powering relevance-based retrieval. - Few-Shot Prompting & Metadata Injection:
Schema samples, joins, and business logic are injected into LLM prompts for better reasoning and accuracy. - Context Compression:
The engine adapts schema representation size according to token limits, preserving critical detail for each model. - Retriever-Augmented Generation:
Relevant schema and metadata are gathered via vector search and added to prompts for context alignment. - Model-Agnostic:
Wren Engine works across LLMs via protocol-based abstraction, ensuring consistent context regardless of backend.
Supported Integrations
- Databases and Warehouses:
Out-of-the-box support for BigQuery, PostgreSQL, MySQL, Microsoft SQL Server, ClickHouse, Trino, Snowflake, DuckDB, Amazon Athena, and Amazon Redshift, among others. - Deployment Modes:
Can be run self-hosted, in the cloud, or as a managed service. - API and Embedding:
Easily integrates into other applications and platforms via API.
Typical Use Cases
- Marketing/Sales:
Rapid generation of performance charts, funnel analyses, or region-based summaries from natural language prompts. - Product/Operations:
Analyze product usage, customer churn, or operational metrics with follow-up questions and visual summaries. - Executives/Analysts:
Automated, up-to-date business dashboards and KPI tracking, delivered in minutes.
Conclusion
WrenAI is a verified, open-source GenBI solution that bridges the gap between business teams and databases through conversational, context-aware, AI-powered analytics. It is extensible, multi-LLM compatible, secure, and engineered with a strong semantic backbone to ensure trustworthy, explainable, and easily integrated business intelligence.
Check out the . All credit for this research goes to the researchers of this project.

