0sql

0sql - semantic layer as a service returning governed SQL from query specs

Working when we checked on .

Visit 0sql

What is 0sql?

0sql is an open source, MIT-licensed semantic layer that turns structured query specs into one deterministic SQL statement, rather than letting an LLM write SQL directly. It targets developers and teams building AI agents (Claude Code, Codex, Copilot, Muse) and custom agentic dashboards over governed data models. The server plans queries against a YAML semantic model in memory, compiles row-level security into the statement, and supports thirteen SQL dialects. It ships as a single static binary with a CLI and HTTP server, and never connects to the warehouse itself.

0sql pricing

Pricing model: Free

Free, forever; MIT licensed

0sql pros

  • MIT licensed with no tiers, seats, or metered requests; free forever
  • Plans specs deterministically in about 70 µs with row-level security compiled in
  • Supports thirteen SQL dialects such as Postgres
  • Runs as one static binary; server plans only, never stores specs or connects to databases
  • Agents call search_fields and plan_query tools instead of writing SQL
  • Includes a chat dashboard demo repo and full walkthrough documentation

0sql cons

  • Requires modeling tables, fields, and joins in YAML before any query works
  • Server cannot execute queries; the user must run the SQL against their own warehouse
  • No managed/hosted edition, so deployment and hosting fall on the user
  • Pricing and support options beyond the open source license are not documented

Frequently asked questions about 0sql

What does 0sql do?

It is an open source semantic layer that takes a structured query spec from an app or agent and returns one correct, deterministic SQL statement planned against a governed YAML model, with row-level security compiled in.

Who is 0sql for?

Developers building AI agents (Claude Code, Codex, Copilot, Muse) and custom agentic dashboards who need reliable SQL generated from governed semantic models instead of LLM-written SQL.

How much does 0sql cost?

Nothing. It is MIT licensed and free forever, with no tiers, seats, or metered requests, and no paid edition behind the license.

Does 0sql connect to my data warehouse?

No. The server plans only and links no database driver: no connection, no rows, no cache. Specs are planned in memory and never stored, so data never leaves the user's network.

How does an agent use 0sql?

The agent calls the search_fields tool to find a measure, then plan_query with a spec in business terms, and receives one SQL statement planned against the governed model.

Which SQL dialects does 0sql support?

The project includes the planner plus thirteen SQL dialects, including Postgres adapters, all open source on GitHub.

How is the semantic model defined?

Tables, fields, measures, and joins with cardinality are declared in YAML stored in git; a branch deploys as a branch, and the planner derives every reachable join combination.

How fast is query planning?

The site shows specs being planned into SQL statements in about 70 microseconds on the server.

How is 0sql deployed?

It ships as one static binary. Running 'zsql serve' starts the whole server; users deploy a model, POST a spec, receive the statement, and run it themselves.

Can 0sql handle complex measures like median order value?

Yes. Inclusion measures let you model sum per ticket and then take the median, producing correct two-level aggregation with the caller's row-level security already in the statement.

Categories

Use cases

Alternatives to 0sql

Similar AI tools

Search AI tools on NeedAnAI · All AI tools A–Z