How Wren AI works
Wren AI combines a product UI, an AI service, and a context layer so users can ask business questions without working directly from raw database schemas.

The three core services
Wren UI
Wren UI is the user-facing application. It is where you:
- connect data sources
- define models and relationships
- ask questions
- review answers, charts, and saved results
Wren AI Service
Wren AI Service handles retrieval, prompting, SQL generation, and result validation. It is responsible for turning a user question into a grounded query workflow instead of sending a raw prompt directly to an LLM.
Wren AI Core
Wren AI Core (previously Wren Engine) provides the context and modeling foundation behind Wren AI. It manages metadata, business definitions, and SQL translation so the system can work from business-aware context instead of schema alone.
For deeper detail on Wren AI Core itself — what problem it solves, how MDL works, and how it powers other agentic surfaces beyond GenBI — see the Wren AI Core overview.
What happens when you ask a question
At a high level, the flow looks like this:
- You ask a question in Wren UI.
- Wren AI Service retrieves the most relevant business context for that question.
- Wren AI Service uses that context to generate SQL.
- Wren AI Core validates and executes the query against the connected data source.
- Wren UI shows the answer, result preview, and any related chart or follow-up questions.
Why the system is split this way
These services are separate so Wren AI can keep responsibilities clear:
- Wren UI focuses on user workflow and interaction.
- Wren AI Service focuses on retrieval and generation.
- Wren AI Core focuses on context, modeling, and execution.
That separation makes it easier to improve the system without forcing the UI, the AI workflow, and the business context layer into one tightly coupled service. It also lets Wren AI Core be used standalone — by AI coding agents, MCP clients, internal copilots, customer-facing analytics, or other BI tools — independently of GenBI.
Learn more
- Wren AI Core overview — the open context layer that powers this stack
- Wren AI Service — the LLM-driven retrieval and SQL generation layer
- Wren AI Core in WrenAI GenBI — how Core fits into the GenBI app specifically