Skip to content

Canner/WrenAI

WrenAI

The open context layer for AI agents over business data.

Your agent doesn't know what your data means. We fix that.

Docs · Discord · Vision · Blog

License: Apache 2.0 PyPI GitHub Release Discord Last commit Follow on X Made by Canner Stars

Canner/WrenAI | Trendshift

📣 2026-05-07 — Wren Engine has merged into this repo under core/. The previous Canner/wren-engine repo is archived. The previous WrenAI GenBI app is preserved on the legacy/v1 branch (tag v1-final). Read the announcement →


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.

Wren AI architecture

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.

before & after

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.

npx skills add Canner/WrenAI --skill '*'

Have multiple AI coding agents installed and want the skills available in all of them? Pass --agent '*':

npx skills add Canner/WrenAI --skill '*' --agent '*'

Or via the install script:

curl -fsSL https://raw.githubusercontent.com/Canner/WrenAI/main/skills/install.sh | bash

See the Skills reference 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 wren-engine, 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 <project>/raw/ and proposes). Both modes write to MDL, instructions, queries, and memory — all reviewable, all Git-friendly.

4. Ask questions

# 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

/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 <project>/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 SDKwren-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 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.

Documentation

  • Quickstart — from skill install to first answer
  • Concepts — what context is, what MDL is, how memory works
  • Connect a database — Postgres, BigQuery, Snowflake, DuckDB, and more
  • Agent SDKs — what's shipping today, what's next

Community

  • 💬 Discord — chat with the team and other builders
  • 🐙 GitHub Discussions — design conversations, RFCs, longer threads
  • 🐦 Twitter / X — release notes and short updates
  • 🗞 Blog — vision, post-mortems, deep dives

Contributing

We build in the open. Issues, PRs, connector contributions, SDK integrations, docs fixes — all welcome.

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: wren-engine)
  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

WrenAI contributors

License

Apache 2.0. See LICENSE.


Come build the context layer with us.

If WrenAI helps you, drop a ⭐ — it genuinely helps us grow!

⬆️ Back to top

About

Turn any AI Agents into world-class data analysts through the open context layer that gives AI agents grounded, governed memory, context, SQL across 20+ data sources, that helps you build GenBI, agentic BI, text-to-sql, dashboards, and agentic analytics.

Topics

Resources

License

Unknown and 3 other licenses found

Licenses found

Unknown
LICENSE
AGPL-3.0
LICENSE-AGPL-3.0
Apache-2.0
LICENSE-APACHE-2.0
CC-BY-4.0
LICENSE-CC-BY-4.0

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors