RekoSet is a Python package that sits between your AI agent and your databases. It drafts what your company's terms mean from the queries people already run, hands the agent that page, and runs every query read-only as the person asking.
"What was net revenue in August?"
The agent gets the schema: every table and column, and nothing about what they mean.
Nothing says what net revenue is
The agent writes a query and chooses a definition on its own.
A plausible wrong number
A database server runs it as a shared service account.
Every question sees all the account can
Every row returns into the conversation and the agent reads off a figure.
No record of what ran, or why
The same question, from the same person, in the agent they already use.
Nothing new to learn
RekoSet hands over the definition, the tables it uses and the report that already computes it.
Meaning your team approved
The agent writes the query from that definition. RekoSet checks it: one read, known columns, defined terms.
Undefined means "undefined", not a guess
RekoSet runs it as the person asking, on every database it touches, within a cost cap.
Your own row filters and grants apply
The rows stay in RekoSet. The agent gets a summary and the record of what ran; a good answer is kept.
Every answer shows its work
RekoSet is one server with five tools, standing where the catalog server and the database server would be. The agent still writes the SQL. Each stage below says what RekoSet does there, with an example from the synthetic marketplace we test on.
import rekoset gives the same five functions and the engine underneath them.pip install rekoset, point it at your databases, run the crawl. Our ten-table test database crawls in under a second; a few hundred tables take minutes.The same server in each. Ollama runs the model, not the agent, so it pairs with an agent that speaks MCP; goose is one.
net revenue
Service fees minus referral credits, by month.
31 runs of rpt_finance_monthly agree
3 ad-hoc queries leave the credits out
fees summed, credits left out: 6% high and plausible
matches the finance report
If definitions already live in dbt metrics, a semantic layer, Snowflake Semantic Views or a catalog such as OpenMetadata, RekoSet reads those first and mines history only for what they leave out: one set of definitions, not two. On Snowflake alone, Cortex Analyst does part of this inside Snowflake; RekoSet does it over Postgres and the warehouse together, in the agent you already use.
| renter | region | GMV |
|---|---|---|
| Halden Labs | EU | 48,200 |
| Oriel AI | US | 44,910 |
| Mistvale | EU | 31,075 |
| Tanager | APAC | 29,660 |
| Northbeam | US | 27,300 |
| Quillon | US | 22,480 |
| renter | region | GMV |
|---|---|---|
| Halden Labs | EU | 48,200 |
| Mistvale | EU | 31,075 |
| 4 rows outside EU never read. The filter is Postgres's own, applied because the query arrived as her. | ||
rekoset.yaml names each database and how to sign in as the person, the row and byte caps, and the one folder write may put files in. No credentials go anywhere else..rekoset/context.yaml is the crawl's output: every drafted definition, join path, metric and repeated report, each with the queries it came from, a confidence, and a status of drafted or verified. Plain YAML; your team can edit it, diff it, keep it in git.pg_stat_statements; Snowflake in its query history. RekoSet reads what is already there. It does not install anything in your database..rekoset/records/, and writing verified queries back into the context file, are the next build; both are small.write saves one to a named table or a file in the write folder; nothing else leaves.Nothing is sent anywhere. Two files on your disk, and the database you already have.
| Right answers | Cost per question | Tokens per question | |
|---|---|---|---|
| AI today The agent has the schema and a SQL tool, and guesses what the terms mean. | 77% | $0.035 | 19,669 |
| RekoSet The agent has the same schema and SQL tool, plus one page of definitions your team verified. | 100% | $0.021 | 16,441 |
50 business questions about a synthetic GPU marketplace, three passes each, one frontier model. Every miss in the first row was a definition the agent had to guess. The second row was right every time and cost 40% less, because the definitions arrived as one page the model could read once and cache, instead of being searched for on every question. That page, drafted from your query history and verified by your team, is what RekoSet makes. We will publish the questions, answers and transcripts with the first release.