Wren AI
A self-hosted text-to-SQL engine gives AI agents business context, queries existing databases and keeps approved definitions in your Git repository.

Wren AI is a self-hosted context and query engine for developers and data teams building AI analytics. It queries your databases using business definitions you control. Model execution depends on the connected agent: using Claude Code’s standard cloud connection sends prompts and model responses to its remote provider, even when Wren's engine runs on your servers.
The engine stores approved metrics, table relationships, units and query examples as reviewable YAML and Markdown in your Git repository. This gives agents business meaning beyond database schemas, so they can use agreed definitions of terms such as revenue. A local LanceDB index retrieves stored knowledge and past queries.
Its Apache DataFusion-based engine connects to PostgreSQL, DuckDB, ClickHouse and cloud warehouses including Snowflake, BigQuery and Databricks. Query validation and row limits constrain execution. MCP lets Claude, ChatGPT and Gemini call the data agent; SDK integrations support LangChain, LangGraph and Pydantic AI.
Wren AI uses an open-core model. The free, self-hostable engine, SDK and skills use Apache 2.0 and don't require a Wren vendor account. The commercial platform adds the team interface, interactive dashboards, embedded analytics, row- and column-level permissions and audit logs. Wren AI Cloud is the hosted offering; commercial self-hosted deployments include VPC and air-gapped options.