Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 55 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ AI agents can already call tools, browse docs, and write code. What they still s

Enterprise data is not just rows in a warehouse. It is definitions, metrics, relationships, permissions, lineage, and intent. An agent that can connect to PostgreSQL or Snowflake still does not know what "net revenue", "active customer", or "pipeline coverage" actually mean in your company.

This is not just our thesis. In [Your Data Agents Need Context](https://a16z.com/your-data-agents-need-context/), a16z argues that data agents break down when they only have connectivity and SQL generation, but lack business definitions, source-of-truth context, and the operational knowledge that explains how a company actually runs.

<p align="center">
<img width="920" height="638" alt="without_wren_engine" src="https://github.com/user-attachments/assets/3295dde5-ce41-4e56-a8ad-daff6a0c3459" />
</p>

Wren Engine exists to solve that gap.

It gives AI agents a semantic layer they can reason over, so they can:
It gives AI agents a context layer they can reason over, so they can:

- understand models instead of raw tables
- use trusted metrics instead of inventing SQL
Expand All @@ -57,7 +59,7 @@ This is the open source context engine for teams building the next generation of

## The Vision

We believe the future of AI is not tool calling alone. It is context-rich systems where agents can reason, retrieve, plan, and act on top of a shared understanding of business reality.
We believe the future of AI is not tool calling alone. It is context-rich systems where agents can reason, retrieve, plan, and act on top of a shared understanding of business reality. Moving beyond text-to-SQL and toward a living context layer that combines semantic meaning, system structure, governance, and human refinement.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix sentence fragment in the Vision paragraph

Line 62 ends with a fragment (Moving beyond text-to-SQL...) after a full sentence. Please convert it into a complete sentence for readability.

Suggested edit
-We believe the future of AI is not tool calling alone. It is context-rich systems where agents can reason, retrieve, plan, and act on top of a shared understanding of business reality.  Moving beyond text-to-SQL and toward a living context layer that combines semantic meaning, system structure, governance, and human refinement.
+We believe the future of AI is not tool calling alone. It is context-rich systems where agents can reason, retrieve, plan, and act on top of a shared understanding of business reality—moving beyond text-to-SQL toward a living context layer that combines semantic meaning, system structure, governance, and human refinement.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
We believe the future of AI is not tool calling alone. It is context-rich systems where agents can reason, retrieve, plan, and act on top of a shared understanding of business reality. Moving beyond text-to-SQL and toward a living context layer that combines semantic meaning, system structure, governance, and human refinement.
We believe the future of AI is not tool calling alone. It is context-rich systems where agents can reason, retrieve, plan, and act on top of a shared understanding of business reality—moving beyond text-to-SQL toward a living context layer that combines semantic meaning, system structure, governance, and human refinement.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 62, The Vision paragraph ends with a sentence fragment
("Moving beyond text-to-SQL and toward a living context layer that combines
semantic meaning, system structure, governance, and human refinement."); revise
that fragment into a complete sentence by either attaching it to the previous
sentence or rephrasing it as a standalone sentence (e.g., "We are moving beyond
text-to-SQL toward a living context layer that combines semantic meaning, system
structure, governance, and human refinement."), and update the README.md Vision
paragraph so the flow is grammatically complete and readable.


Wren Engine is our open source contribution to that future.

Expand All @@ -78,14 +80,47 @@ Wren Engine turns business data into agent-usable context.
At a high level:

1. You describe your business domain with Wren's semantic model and MDL.
2. Wren Engine analyzes intent, models, relationships, and access rules.
3. It plans and generates correct queries across your underlying data sources.
2. Wren Engine captures the context agents need: models, metrics, relationships, and access rules.
3. It analyzes intent and plans correct queries across your underlying data sources.
4. MCP clients and AI agents interact with that context through a clean interface.
5. Teams keep refining the model as business logic and systems evolve.

This is the practical open source path from text-to-SQL toward context-aware data agents.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use hyphenated compound adjective

Line 88 should use “open-source” when modifying “path”.

Suggested edit
-This is the practical open source path from text-to-SQL toward context-aware data agents.
+This is the practical open-source path from text-to-SQL toward context-aware data agents.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This is the practical open source path from text-to-SQL toward context-aware data agents.
This is the practical open-source path from text-to-SQL toward context-aware data agents.
🧰 Tools
🪛 LanguageTool

[grammar] ~88-~88: Use a hyphen to join words.
Context: ...tems evolve. This is the practical open source path from text-to-SQL toward cont...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 88, Update the README sentence "This is the practical open
source path from text-to-SQL toward context-aware data agents." to use the
hyphenated compound adjective "open-source" when modifying "path" (i.e., change
"open source path" to "open-source path") so the phrase reads correctly as "This
is the practical open-source path from text-to-SQL toward context-aware data
agents."


That means your agent is no longer asking, "Which raw table should I query?"

It is asking, "Which business concept, metric, or governed slice of context do I need to answer this task correctly?"

## Wren Engine vs. Other Data Tools

People often compare Wren Engine to catalog services like DataHub, raw database MCP servers, BI semantic tools, or text-to-SQL agents.

The simple difference is:

- those tools usually help an agent find data or generate SQL
- Wren helps an agent understand business meaning and produce the right query through a context layer

| Tool type | What it gives the agent | ***What Wren Engine adds*** |
| --- | --- | --- |
| Data catalog services | Tables, columns, lineage, owners, descriptions | Business models, metrics, relationships, and governed query planning |
| Raw database or schema access | Direct access to schemas and SQL execution | A business layer above raw tables so the agent does not have to guess intent |
| BI or semantic tools | Curated metrics and entities for analytics workflows | An open context layer designed for MCP and agent workflows |
| Text-to-SQL agents | Fast SQL generation from natural language | Better accuracy by grounding generation in explicit business definitions |

Many teams will want both:

- a catalog to inventory and document the data estate
- Wren Engine to turn that data into agent-ready context

Why that matters:

- more accurate answers because joins and metrics are defined instead of guessed
- more consistent answers because every agent uses the same business definitions
- safer data access because governance can be carried into query planning
- less prompt engineering because the context lives in the engine, not in the prompt

Without Wren, an agent may know where the data is but still not know how to answer the question correctly.

## Built For Agent Builders

Wren Engine is especially useful for the open source community building agent-native workflows in tools like:
Expand All @@ -107,6 +142,8 @@ Use it to power experiences like:
- code assistants that need real business context, not just schema dumps
- internal AI tools that should be grounded in semantic models instead of ad hoc SQL

This is especially important in developer-facing agent environments, where the assistant may understand your codebase but still lacks the business context required to answer data questions correctly.

## Why Open Source

We think agent infrastructure should be composable.
Expand All @@ -121,6 +158,8 @@ Wren Engine is open source so the community can:
- build opinionated agent products on a transparent foundation
- help define what a real context layer for AI should look like

We want that context layer to be inspectable, composable, and community-owned, not trapped inside a single proprietary interface.

## Architecture At A Glance

```text
Expand All @@ -139,6 +178,8 @@ Core ideas:
- `ibis-server` provides the execution and connector-facing API layer
- `mcp-server` makes Wren easy to use from MCP-compatible agents

That last point matters: context only helps agents when it is available at runtime. Wren is built to expose that layer over MCP and APIs.

## Repository Map

This repository contains the core engine modules:
Expand Down Expand Up @@ -171,20 +212,22 @@ Current open source support includes connectors such as:
- MySQL
- Oracle
- PostgreSQL
- Redshift
- SQL Server
- Snowflake
- Trino
- Redshift

See the connector API docs in the project documentation for the latest connection schemas and capabilities.

## Get Started

### Use Wren through MCP

If you want to use Wren Engine from an AI agent or MCP-capable IDE, start here:
If you want to use Wren Engine from an Claude Code or MCP-capable IDE, start here:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix incorrect article before “Claude Code”

Line 226 uses “an Claude Code”; this should be “a Claude Code”.

Suggested edit
-If you want to use Wren Engine from an Claude Code or MCP-capable IDE, start here:
+If you want to use Wren Engine from a Claude Code or MCP-capable IDE, start here:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
If you want to use Wren Engine from an Claude Code or MCP-capable IDE, start here:
If you want to use Wren Engine from a Claude Code or MCP-capable IDE, start here:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 226, Replace the incorrect article "an" before "Claude
Code" in the README phrase "an Claude Code" with "a" so the sentence reads "a
Claude Code or MCP-capable IDE"; locate the exact text "an Claude Code" and
update it to "a Claude Code" in the README to correct the grammar.


- [MCP Server README](./mcp-server/README.md)
- [Quick start: Chat with jaffle_shop using Wren Engine + Claude Code](https://docs.getwren.ai/oss/engine/get_started/quickstart)
- [Quick start with Claude Desktop](https://docs.getwren.ai/oss/engine/get_started/quickstart_claude)
- [Understanding Wren AI project structure](https://docs.getwren.ai/oss/engine/get_started/structure)

The MCP server includes:

Expand All @@ -195,10 +238,10 @@ The MCP server includes:

### Learn the concepts

- [Quick start with Wren Engine](https://docs.getwren.ai/oss/engine/get_started/quickstart)
- [What is semantics?](https://docs.getwren.ai/oss/engine/concept/what_is_semantics)
- [What is context?](https://docs.getwren.ai/oss/engine/concept/what_is_context)
- [What is Modeling Definition Language (MDL)?](https://docs.getwren.ai/oss/engine/concept/what_is_mdl)
- [Benefits of Wren Engine with LLMs](https://docs.getwren.ai/oss/engine/concept/benefits_llm)
- [Your Data Agents Need Context](https://a16z.com/your-data-agents-need-context/)
- [Powering Semantic SQL for AI Agents with Apache DataFusion](https://getwren.ai/post/powering-semantic-sql-for-ai-agents-with-apache-datafusion)

### Developer entry points
Expand All @@ -213,7 +256,7 @@ The MCP server includes:
Common workflows:

```bash
# Rust semantic engine
# Rust context engine
cd wren-core
cargo check --all-targets

Expand All @@ -229,7 +272,7 @@ cd mcp-server

## Project Status

Wren Engine is actively evolving in the open. The current focus is to make the semantic layer, execution path, and MCP integration stronger for real-world agent workflows.
Wren Engine is actively evolving in the open. The current focus is to make the context engine, execution path, and MCP integration stronger for real-world agent workflows.

If you are building with agents today, this is a great time to get involved.

Expand All @@ -239,5 +282,6 @@ If you are building with agents today, this is a great time to get involved.
- Open a [GitHub issue](https://github.com/Canner/wren-engine/issues)
- Explore [Wren AI](https://github.com/Canner/WrenAI) to see the broader product vision
- Read our mission piece: [Fueling the Next Wave of AI Agents](https://getwren.ai/post/fueling-the-next-wave-of-ai-agents-building-the-foundation-for-future-mcp-clients-and-enterprise-data-access)
- Read the market thesis from a16z: [Your Data Agents Need Context](https://a16z.com/your-data-agents-need-context/)

Wren Engine is for builders who believe AI needs better context, not just better prompts.
Loading