### The open context layer for AI agents over business data.
*Your agent doesn't know what your data means. We fix that.*
[Docs](https://docs.getwren.ai) ยท [Discord](https://discord.gg/5DvshJqG8Z) ยท [Vision](https://www.getwren.ai/post/the-missing-context-layer-for-ai-agents-over-business-data) ยท [Blog](https://www.getwren.ai/blog)
[](LICENSE)
[](https://pypi.org/project/wrenai/)
[](https://github.com/Canner/WrenAI/releases)
[](https://discord.gg/5DvshJqG8Z)
[](https://github.com/Canner/WrenAI/commits/main)
[](https://x.com/getwrenai)
[](https://cannerdata.com)

> ๐ฃ **2026-05-07** โ Wren Engine has merged into this repo under [`core/`](./core). The previous `Canner/wren-engine` repo is archived. The previous WrenAI GenBI app is preserved on the [`legacy/v1`](https://github.com/Canner/WrenAI/tree/legacy/v1) branch (tag `v1-final`). [Read the announcement โ](https://github.com/Canner/WrenAI/discussions/2205)
---
## What WrenAI is
WrenAI is the **open context layer** that gives your agents what schemas don't: business semantics, examples, memory, governance, and โ soon โ the unstructured corporate knowledge that lives in your docs, wikis, and chat threads. Built for the agent frameworks you already use.

## Why agent builders pick WrenAI
- **Open by default** โ Open-sourced core, SDK, and skills through Apache-2.0 license.
- **Built for AI agents** โ Skills, agentic architecture, context retrieval are first-class. Ships as SDKs for the agent frameworks that engineers already use.
- **Correctness as primitives** โ rich schema retrieval, dry-plan validation, structured errors with hints, value profiling, eval runner. The agent orchestrates; the trace lives in the agent's reasoning.
- **Reviewable, reproducible context** โ every definition, example, and mapping is versionable and evidence-linked. Git-friendly.
- **Sits on top of your existing stack** โ warehouse, transformation pipelines, your existing semantic layer. Not another tool to maintain.
## With & Without Wren AI
Agents are everywhere. Claude Code, Cursor, ChatGPT, Aider, LangChain pipelines, Pydantic AI flows, in-house copilots, customer-facing apps. None of them should have to rediscover your business logic from scratch. With Wren AI, "the context layer," they query through a standalone, shared interface usable by every agent and person, not gated behind a single vendor's UI and architecture.
## Quickstart
WrenAI is **agent-driven by design**: you install the skill bundle once, then let your AI coding agent (Claude Code, Openclaw, Hermes, Codex, etc.) drive the rest โ Python deps, DB connection, project scaffold, and first query.
### 1. Install the skill bundle
Skills are workflow guides that teach AI coding agents (Claude Code, Openclaw, Hermes, Codex, etc.) how to drive the Wren CLI for you.
```bash
npx skills add Canner/WrenAI --skill '*'
```
Have multiple AI coding agents installed and want the skills available in all of them? Pass `--agent '*'`:
```bash
npx skills add Canner/WrenAI --skill '*' --agent '*'
```
Or via the install script:
```bash
curl -fsSL https://raw.githubusercontent.com/Canner/WrenAI/main/skills/install.sh | bash
```
See the [Skills reference](https://docs.getwren.ai/oss/reference/skills) for the full list of skills installed and what each one does.
### 2. Ask your agent to set things up
Open your agent in a project directory and ask:
Use the `/wren-onboarding` skill to install and set up Wren AI.
The agent will check your environment, install `wrenai`, create a connection profile, scaffold the project, and run a first query โ all in one flow.
### 3. (Optional) Enrich the project
Once onboarding finishes, give your project the business context schemas can't carry:
Use the `/wren-enrich-context` skill in grill mode.
Two modes: **grill** (one question at a time, you in the loop) or **auto-pilot** (agent reads `/raw/` and proposes). Both modes write to MDL, instructions, queries, and memory โ all reviewable, all Git-friendly.
### 4. Ask questions
```bash
# Ask any question
"who are our top 10 customers by sales this quarter?"
```
Or just ask your agent in natural language โ it uses the context layer to resolve schema, recall similar past queries, and write governed SQL.
**Want to try it without your own database?** Ask your agent to run `/wren-onboarding` with the bundled `jaffle_shop` sample dataset โ same flow, but you'll be querying a real warehouse end-to-end in a couple of minutes.
## Two beats: scaffold fast, enrich deep
```bash
/wren-onboarding # Scaffold a Wren project from your DB (agent-driven)
/wren-enrich-context # One skill, two modes: (Under development)
# grill โ one question at a time, you in the loop
# auto-pilot โ agent reads /raw/ and proposes
wren ask "..." # Query through the context layer
```
Fast at first. Deep when you need it. Always reviewable and Git-friendly.
## What's Included
- **Modeling Definition Language (MDL)** โ models, columns, relationships, views, cubes, metrics, row-level / column-level access control (RLAC / CLAC)
- **Engine** โ Apache DataFusion based, 22+ data sources
- **Memory & examples** โ LanceDB-backed, hybrid retrieval, versionable
- **Agent SDK** โ `wren-langchain` (LangChain / LangGraph), `wren-pydantic`; reference Python integration for other stacks
- **Governed execution primitives** โ functions, dry-plan, row limits, access control
## What's next
- **Context enrichment skill** โ `/wren-enrich-context` (grill + auto-pilot modes) hardened across MDL, instructions, queries, and memory
- **End-to-end correctness primitives** โ value profiling, rich retrieval, structured errors, golden eval runner
- **Agent-native distribution** โ first-class SDKs across major agent frameworks; see [GitHub Discussions](https://github.com/Canner/WrenAI/discussions) for what's prioritized next
- **Full governed execution** โ audit logs, rate limits, approval workflow, data-flow inspector
Full roadmap and design notes: see the [vision paper](https://docs.getwren.ai/oss/introduction).
## Documentation
- [Quickstart](https://docs.getwren.ai/oss/get_started/quickstart) โ from skill install to first answer
- [Concepts](https://docs.getwren.ai/oss/concepts/what_is_context) โ what context is, what MDL is, how memory works
- [Connect a database](https://docs.getwren.ai/oss/guides/connect/overview) โ Postgres, BigQuery, Snowflake, DuckDB, and more
- [Agent SDKs](https://docs.getwren.ai/oss/sdk/overview) โ what's shipping today, what's next
## Community
- ๐ฌ [Discord](https://discord.gg/5DvshJqG8Z) โ chat with the team and other builders
- ๐ [GitHub Discussions](https://github.com/Canner/WrenAI/discussions) โ design conversations, RFCs, longer threads
- ๐ฆ [Twitter / X](https://x.com/getwrenai) โ release notes and short updates
- ๐ [Blog](https://www.getwren.ai/blog) โ vision, post-mortems, deep dives
## Contributing
We build in the open. Issues, PRs, connector contributions, SDK integrations, docs fixes โ all welcome.
- [Contributor guide](./CONTRIBUTING.md)
- [Connector ecosystem program](./docs/contributing-a-connector.md) โ three-tier ownership: official, community-blessed, community-owned
- [Architecture map](./docs/architecture.md) โ find the right place to land your change
- Looking for somewhere to start? Try the [`good first issue`](https://github.com/Canner/WrenAI/labels/good%20first%20issue) label.
Project structure โ click to expand
```
core/
wren-core/ Rust semantic engine (Apache DataFusion)
wren-core-base/ Shared manifest types + MDL builder
wren-core-py/ Python bindings (PyPI: wren-core)
wren-core-wasm/ WebAssembly build (npm: wren-core-wasm)
wren/ Python SDK and CLI (PyPI: wrenai)
wren-mdl/ MDL JSON schema
sdk/
wren-langchain/ Reference agent SDK integration
skills/ Agent skills for context authoring
docs/ Module documentation
examples/ Example projects
```
## Contributors
## License
Apache 2.0. See [LICENSE](./LICENSE).
---
*Come build the context layer with us.*
**If WrenAI helps you, drop a โญ โ it genuinely helps us grow!**