Private Preview - features may change without notice
GramSpec
Free Allowance →
Architecture

How GramSpec works

Three views of the system, at the altitude an architect evaluates: how the apps share one graph substrate, how a knowledge graph is created and flows through the product, and how the API paths keep your data and your model on your side of the line. Details live in the specification and the API reference; this page is the map.

01 · The product

One graph between the model and your data

The language model never sees your DDL and never holds your credentials. It reads the GRAM graph — a compiled, closed-world description of your schema — and every query it writes is validated against that graph before a read-only connection runs it.

YOUR BROWSER Grammar model the graph Dashboard ask · pin · share Analyst agentic investigation GRAMSPEC GRAM graph entities · fact types keys · cardinality · constraints Language model reads the graph, never the DDL Query gate read-only enforcement · every join validated against the graph YOUR DATABASE SQL Server · Postgres Snowflake · more credentials encrypted at rest, never in prompts 1 2 3 4 5 6
The GRAM graph is the only schema the model ever reads; the gate is the only path to your data.
  1. Model in Grammar. Connect a database (or start from nothing) and compile its structure into a GRAM graph — entities, fact types, keys, cardinality, and the constraints your schema never wrote down.
  2. Ask in Dashboard or Analyst. A plain-English question, or a long-running investigation. Both consume the same graph.
  3. The model reads the graph. Not your DDL, not your connection string, not your rows. The graph declares every join path and every rule the query must obey.
  4. SQL is generated, then checked. The gate validates every query against the graph and blocks anything that is not a read.
  5. Your database answers. Queries run over an encrypted connection with read-only enforcement; credentials never leave the server and never enter a prompt.
  6. Results render as answers. Charts, tables, findings — each traceable to the SQL that produced it.
Closed-world, by construction. If a concept is not in the graph, there is no path to query it — the system says so instead of guessing. Structural hallucination is not rare here; it is unrepresentable.
02 · The graph

Three doors in, one document out

However a graph starts — from a live schema, from business prose, or from a Power BI model — it becomes the same portable document, and everything downstream consumes that one artifact.

THREE DOORS IN Live database reverse-engineer the schema Business prose model before a database exists Power BI .pbit import the model a report uses Grammar visual canvas · ORM notation conversational modeling in sentences constraints inferred from language 1 2 GRAM document one JSON file · open spec readable by any model checkable by the business WHERE IT FLOWS Dashboard datasets · premium chat Analyst long-running investigations Export & API portable JSON · Enterprise 3
Documentation drifts; compilations rerun. The graph is a compiler output, not a wiki page.
  1. Enter through any door. Point Grammar at a live database and the compiler reads keys, types, and relationships from the schema. Start from prose and the conversational modeler turns sentences into entities, facts, and constraints. Or import a Power BI template and take every field, or only what the report uses.
  2. Refine on the canvas. Every relationship is a sentence a business person can verify; every constraint is visible notation. The compiled document conforms to the open GRAM specification.
  3. The same document feeds everything. Bond it to a connection and it becomes a dataset for Dashboard's chat; open it in Analyst for investigations; on the Enterprise plan, export it as portable JSON or serve it through the API. One artifact, no copies to drift.
03 · The API

Two lanes, one line your data never crosses

The GRAM API hands your own software the same contract the GramSpec apps use. On the bring-your-own-model lane, GramSpec supplies the reasoning substrate and nothing else — your questions, your rows, and your model traffic stay on your side of the boundary.

GRAMSPEC YOUR INFRASTRUCTURE on the top lane, your data and model traffic never cross this line LANE A · BRING YOUR OWN MODEL The contract SystemPrompt: rules + dialect + graph AnalystKit: agent prompt + 7 tool schemas cache by hash · 304 when unchanged Your app runs the loop Your model any provider, your account Your database read-only, your rules 1 2 3 4 LANE B · MANAGED Your app no model of its own The pipeline Query: graph + question → model → parsed SQL blocks + chart config spends your GramSpec AI allowance 5 6 Every request authenticates with a per-user API key (Enterprise plan) · per-user rate limits · full request trail
Lane A: GramSpec supplies the contract and steps out of the way. Lane B: GramSpec runs the pipeline for you.
  1. Fetch the contract. One GET returns the complete system prompt for your project — or the AnalystKit: the agent prompt, the full graph, and the schemas for the seven analyst tools.
  2. Cache it by hash. The response carries a content hash; revalidate with one header and get 304 until the graph, rules, or dialect actually change.
  3. Call your own model. Any provider, your account, your data residency. The prompt is provider-neutral by design.
  4. Execute on your own database. Your app runs the SQL under its own read-only rules. GramSpec never sees a question, a row, or a token of model traffic on this lane.
  5. Or take the managed lane. POST a question against a dataset you own and GramSpec runs the whole pipeline — model call, parsing, chart config — and returns structured results.
  6. Structured results either way. SQL blocks you can execute, chart configuration you can render, and honest refusals when the graph cannot answer.
ISV embed

SystemPrompt

Add "ask your data" to your product: fetch the prompt, pair it with your customer's question, call the model you already run.

Domain copilot

AnalystKit

Build a claims investigator or procurement copilot: the kit hands you the agent brain; you own the loop, the compute, and the data plane.

No model at all

Query

Point at a dataset, ask a question, get parsed SQL and chart config back. GramSpec runs the pipeline end to end.

Request and response shapes, caching, and the error contract live in the API reference.