---
schema_version: "newruntime-agent-readable-v0.2"
type: "post"
stable_id: "post:wrenai-governed-genbi-context-layer"
slug: "wrenai-governed-genbi-context-layer"
title: "WrenAI Puts a Governed Context Layer Under Agent-Generated BI"
description: "WrenAI moves agentic BI beyond text-to-SQL by making semantics, definitions, examples, memory, validation, and access rules reviewable inputs to every answer."
retrieval_nugget: "WrenAI moves agentic BI beyond text-to-SQL by making semantics, definitions, examples, memory, validation, and access rules reviewable inputs to every answer. An LLM can produce syntactically valid SQL and still misunderstand the business. WrenAI treats that gap as a context-engineering problem, not a prompt-tuning problem. The current open-source project is a GenBI engine for agents."
status: "published"
published_at: "2026-07-30"
updated_at: "2026-07-30"
record_date: "2026-07-30"
date_kind: "published_at"
topics: ["agents","data-engineering","developer-tools"]
source_urls: ["https://github.com/Canner/WrenAI"]
visuals: [{"id":"wrenai-governed-genbi-context-layer-nano-banana","kind":"editorial-diagram","role":"hero","src":"https://newruntime.com/images/posts/wrenai-governed-genbi-context-layer-nano-banana.webp","alt":"Hand-drawn GenBI architecture with databases and documents below a reviewable context spine, then governed planning, validation, execution, and a chart above.","caption":"WrenAI moves trust below the generated answer by making semantics, definitions, examples, memory, validation, and access rules reviewable system inputs.","credit":"New Runtime synthesis from the public WrenAI repository","source_url":"https://github.com/Canner/WrenAI","generated_with":"gemini-3.1-flash-image","width":1600,"height":900,"legend":[]}]
telegram_message_id: 2871
telegram_url: "https://t.me/qwgai/2871"
telegram_message_ids: [2871]
telegram_delivery_mode: "rich_media"
telegram_media_url: "https://t.me/qwgai/2871"
routes: {"html":"https://newruntime.com/posts/wrenai-governed-genbi-context-layer/","markdown":"https://newruntime.com/posts/wrenai-governed-genbi-context-layer.md","json":"https://newruntime.com/posts/wrenai-governed-genbi-context-layer.json"}
source_format: "markdown"
---

# WrenAI Puts a Governed Context Layer Under Agent-Generated BI

## Retrieval answer

WrenAI moves agentic BI beyond text-to-SQL by making semantics, definitions, examples, memory, validation, and access rules reviewable inputs to every answer. An LLM can produce syntactically valid SQL and still misunderstand the business. WrenAI treats that gap as a context-engineering problem, not a prompt-tuning problem. The current open-source project is a GenBI engine for agents.

An LLM can produce syntactically valid SQL and still misunderstand the business. WrenAI treats that gap as a context-engineering problem, not a prompt-tuning problem.

The current open-source project is a GenBI engine for agents. It connects databases and warehouses to a reviewable context layer containing semantic models, approved definitions, examples, instructions, memory, and governance. An agent uses that layer to generate SQL, validate a dry plan, execute with limits, and turn results into answers or deployable dashboards.

Wren calls the three beats Generate, Deploy, and Know. Generate produces governed SQL and charts. Deploy packages an answer as a browser-side dashboard that can ship to the owner's Vercel or Cloudflare account. Know keeps the definitions and successful query patterns in version-controlled files instead of hiding them inside a vendor UI.

## The trust boundary is below the agent

The repository includes a Modeling Definition Language for models, relationships, cubes, metrics, and row- or column-level access control. Structured errors and dry-plan validation give the agent a correction path before execution. A local memory index can recall prior queries without making memory the source of truth.

This matters because schema alone does not encode whether revenue means gross or net, which joins are approved, how units convert, or which enum values should be grouped. If those rules live only in a long system prompt, they are difficult to review, diff, and reuse across agents.

The current project should not be confused with the older Docker-based chat-first GenBI application. That product is preserved on a legacy branch and no longer receives features or security fixes. The maintained direction is the open context and execution layer plus agent-facing CLI, SDK, and skills.

WrenAI's claim is not that an agent makes BI automatically trustworthy. It makes the inputs to trust explicit: semantic definitions, validation, access controls, evidence-linked files, and deployable artifacts that can be reviewed independently of the conversation that produced them.

## Source

- [Canner/WrenAI](https://github.com/Canner/WrenAI)
