Vanna vs Contextflo: library or product?
An honest comparison of Vanna and Contextflo for text-to-SQL: the open-source Python RAG library you self-host and train, versus a hosted, governed layer your team queries in Claude or ChatGPT.
Vanna and Contextflo both turn a plain-language question into SQL against your database, and that is where the resemblance ends. Vanna is a Python library you install, train, and wrap in an app you build. Contextflo is a hosted product you connect your data to and then query from Claude or ChatGPT. I run Contextflo, so read this with that in mind, but the two are aimed at different people, and the honest answer to "which one" depends on whether you want to build the thing or connect to one.
What Vanna is
Vanna is an open-source, MIT-licensed project for text-to-SQL, installed with pip install vanna. It began as a RAG library, retrieval-augmented generation, where you train it on context about your database and at question time it retrieves the relevant pieces and hands them to an LLM to write the SQL. Its 2.0 rewrite turned it into an agent framework, with agentic retrieval, a FastAPI backend, and governance built in. Worth knowing up front: the public repo was archived read-only in March 2026, so you would be building on a codebase that no longer takes upstream changes.
Training is a real step you own. You feed Vanna your DDL statements, your documentation, and example SQL queries, and it stores those in a vector database so it can pull the right ones back later. It can also auto-train on queries that ran successfully, so the model gets better as people use it. Your actual table data never goes to the LLM or the vector store, only the schema and the context you trained.
The library is deliberately unopinionated about the rest of the stack. It plugs into whatever LLM you point it at (OpenAI, Anthropic, a local model through Ollama), whatever vector database you prefer (ChromaDB, Qdrant, others), and whatever SQL database you run. That flexibility is the whole design. Vanna handles the retrieval and prompting; you supply everything around it, including the interface your users actually see. Vanna 2.0 also ships governance in the open-source library itself: user-aware row-level security, group-based access rules, and per-user audit logs. A managed tier, Vanna Cloud, hosts the vector memory and those controls for you.
The fork: build the thing, or connect to one
Before comparing features, get one decision straight, because everything follows from it. Do you want to build a text-to-SQL application, or connect an existing one to your data?
Vanna is for the first. It is a framework for developers who are putting natural-language querying inside their own product, or standing up an internal tool where they want to own the model, the prompts, and where the data lives. You write the code that calls Vanna, host it, and keep it running. That is a feature if building it is the point, and a cost if it is not.
Contextflo is for the second. You connect your warehouses and sources, the context is generated for you, and your team asks questions in the AI tool they already have open. Nothing to assemble, nothing to host. You give up the low-level control Vanna hands a developer. You get answers the same day without writing a line of orchestration.
| Vanna | Contextflo | |
|---|---|---|
| What you run | A Python library you install, wire to an LLM and vector DB, and host behind your own app | A hosted product you connect data to; nothing to build or operate |
| Who asks, and where | Whoever uses the app you build, or Vanna Cloud's app | Your team, in the Claude or ChatGPT window they already use, over MCP |
| Context | You train the RAG on DDL, docs, and example SQL; can auto-train on queries that ran | Generated from your schema, source code, and docs, then edited by you |
| Access control and audit | Vanna 2.0 has row-level security, group RBAC, and audit logs built into the library (also managed in Vanna Cloud) | Query-time, table-level access control and per-user audit, built in |
| Setup and fit | A framework for embedding text-to-SQL in your own product | About ten minutes; also does dashboards and scheduled reports |
Where Vanna wins
For a developer, Vanna wins on the things that matter to a developer. It is open source and free at the core, so there is no per-seat bill and no vendor between you and the code. You can read it, fork it, and rewrite how retrieval and prompting work, which is worth a lot if you are embedding text-to-SQL inside a product you ship.
It also keeps everything in your own infrastructure. The library, the vector store, and the model can all run in your environment, up to and including a local LLM, which is the clean answer for a team that cannot send schema to a third party. Swapping any of those pieces is a config change rather than a migration, because Vanna was built to sit in the middle of a stack you assembled. Contextflo, being hosted, matches neither the self-hosting nor that level of control.
Where Contextflo wins
The gap opens up once the people asking questions are not the people who could build a Vanna app.
Your team asks in the tool they already use. Contextflo connects your data to Claude or ChatGPT through MCP, so a non-technical person asks in a chat window they already had open, and the model writes and runs real SQL with the query shown so they can check it. With Vanna, someone first has to build and host the interface those people will use, or move everyone onto Vanna Cloud's app. Bringing your own agent means there is no new destination to adopt.
The context is generated, not hand-trained. Both tools need to know that rev_usd is revenue and which table joins to which. In Vanna you train that by writing DDL, docs, and example SQL into the model. Contextflo generates it from your schema, your source code, and your docs, and then you review and edit it. You are correcting a draft instead of authoring one, which is a smaller and less perishable job as the schema changes.
Governance without anyone building it. Vanna 2.0 does have row-level security, group rules, and audit logs in the box now, but you still stand up and host the app those controls live in. With Contextflo, admins set which schemas and tables each person or group can query, it is enforced at query time, every query is attributed and logged, and none of it is something you deploy or maintain. Contextflo also does the ordinary BI jobs on top: dashboards, scheduled reports, and saved metric definitions. Team pricing is $75 per user per month for unlimited queries, with a free tier for one user and one source.
The one honest limit
Contextflo's access control is table-level, not row-level. Admins decide which tables and schemas a person can query, and that is enforced before the warehouse runs anything, but Contextflo does not filter individual rows by user inside a table. If your requirement is that two salespeople querying the same orders table each see only their own accounts, that is row-level security, and it is not what Contextflo does today, whereas Vanna 2.0 does. The generated context is also a draft that someone reviews, not a finance-signed-off versioned model. If either of those is a hard requirement, weigh it before you switch.
If you want the head-to-head on the semantic-layer angle, I wrote up Cube vs dbt vs Contextflo, and DIY MCP server vs Contextflo covers what building the governed layer yourself actually takes.
How to choose
If you are a developer putting natural-language querying inside your own product, or you need everything self-hosted and under your control, use Vanna. It is built for exactly that and it is good at it.
If the people who will ask the questions are analysts, ops, and growth folks rather than the person who would build the app, connect Contextflo and let them ask in Claude or ChatGPT. You can start free with one user and one source and see whether the answers hold up before anyone else is involved, or talk to the founder.
FAQ
Is Vanna free? The core Vanna library is open source under the MIT license, so it is free to install and self-host. You still pay for the LLM and vector database it calls, and for the time to build and run the app around it. Vanna 2.0 also includes row-level security, group rules, and audit logs in the open-source library, and sells a hosted tier, Vanna Cloud, that manages the memory and those controls for you. Contextflo is a hosted product at $75 per user per month for unlimited queries, free for one user and one source.
Do I have to train Vanna myself? Yes. Vanna is a RAG framework, so you train it by feeding it your DDL, documentation, and example SQL, and it can auto-train on queries that ran successfully. Contextflo generates that context from your schema, source code, and docs, and you review and edit it rather than assemble it from scratch.
Can non-technical people use Vanna? They can use whatever interface you build on top of the library, or Vanna Cloud's app. Contextflo takes a different path: your team asks in the Claude or ChatGPT window they already have open, over MCP, so there is no separate app to adopt.
When is Vanna the better choice? When you are a developer who wants to embed text-to-SQL inside your own product, keep everything self-hosted, and control the LLM, vector store, and prompts yourself. That is what Vanna is built for, and it does it well.