Skip to content
HUMAN READABLE. AGENT READY.

The query language
for AI agents.

From a question to a query.
With meaning intact.

NexQL brings natural-language readability to deterministic database queries. Give your agents the language of your domain. Let FactEngine translate it to SQL or Cypher.

Readable intentFormal grammarSQL + Cypher
QUESTION → NEXQL01 / SEE THE LANGUAGE
YOU ASK

What films are playing at the Rialto?

NEXQL
WHICH Film is showing at (Cinema:'Rialto') on (DateTime:TODAY)

WHICH selects Film. The named cinema constrains the question. No RETURN clause needed.

From the NexQL query-by-example collection.Explore the examples →
REAL QUESTIONS. REAL NEXQL.

It reads like the question.
Because that’s the point.

From a simple lookup to a sales analysis. See how much you can ask with a few words and the relationships in your model.

CUSTOMER ORDERS01

Which orders are urgent?

NEXQL
WHICH Order has (Order Priority:'1-URGENT')
Filter naturally

Name the object. Add a condition. That is a complete query.

CUSTOMER ORDERS02

Who bought what?

NEXQL
WHICH Customer made AN Order
THAT is for WHICH Part
AND THAT Order was on (Date:'2026-09-26')
Choose multiple results

Return customers and parts together. WHICH makes the selection explicit.

CINEMA BOOKINGS03

What films did Simon book?

NEXQL
WHICH Film has A Session
THAT has A Booking
THAT is for (Person:'Simon')
Follow relationships

Follow a readable path through the model, from a film to the person who booked.

PIZZA ORDERS04

What toppings are on a Margherita?

NEXQL
WHICH PizzaTopping is for A PizzaNameHasTopping
THAT has (PizzaName:'Margherita')
Ask about your domain

Use the names and relationship readings in the pizza model to ask a specific question.

CINEMA BOOKINGS05

How many seats are in this cinema?

NEXQL
WHICH Seat is in A Row
THAT is in (Cinema:'Great Western Cinema')
RETURN COUNT(*)
Count the matches

Add RETURN when you want an aggregate instead of the default identifying fields.

SALES ANALYTICS06

What are total sales by customer city?

NEXQL
WHICH Sales Order has WHICH Sold To Customer City
AND WHICH Line Total
RETURN SalesOrder.SldToCustCity, SalesOrder.SlsLineTotal.SUM
GROUP BY SalesOrder.SldToCustCity
Group and aggregate

Keep the domain question readable while expressing exactly how totals should be grouped.

Each example uses its domain’s model vocabulary. RETURN is optional.

Explore more query examples →
LESS TRANSLATION. MORE INTENT.

Close to the question.
Precise at execution.

An agent needs a clear way to express what it wants. A database needs a precise query. NexQL connects the two.

01 / GENERATE

A shorter step from natural language

Object names and relationship readings already sound like the question. Give the AI your model vocabulary and examples to guide query generation.

02 / UNDERSTAND

Queries you can read and review

See which objects an agent selects, which relationships it follows, and which conditions it applies. Keep the question visible in the query.

03 / EXECUTE

Deterministic translation

NexQL has a formal grammar. FactEngine resolves the query against a model and translates it to SQL or Cypher for the target database.

A SEMANTIC STEP IN YOUR AGENT STACK

Let the agent express intent.
Let the model supply meaning.

Keep domain concepts in the agent’s context, and database mappings in FactEngine. The model connects the names and relationships in a query to the data behind them.

Explore the agent workflow →
  1. 01
    Natural-language questionThe user’s intent
  2. 02
    NexQLA structured query generated by the agent
  3. 03
    FactEngine + your modelResolve meaning and translate the query
  4. 04
    SQL / Cypher → resultsExecute against the mapped database
START WITH ONE WORD

WHICH changes
what comes back.

Ask for an object. Follow a relationship. Select another object. A query can return useful results without a RETURN clause.

Learn how results work →
WHICH Film

Return the films.

WHICH Film is showing at WHICH Cinema

Return the films and the cinemas where they’re showing.

For each selected object type, NexQL returns the fields of the first-found uniqueness constraint, falling back to the primary key when no uniqueness constraint is found. Use RETURN for explicit fields and aggregates.
FROM CURIOUS TO QUERYING

Your next question starts here.

MEANING UNDER THE HOOD

Built on Object-Role Modeling and Fact-Based Modelling, NexQL asks questions using the concepts and relationships in your domain.

Meet the foundations →
NEXQL / THE AGENTIC QUERY LANGUAGE

Give your agents
a language for data.

Start with your first query ↗

Developed for FactEngine. Explore the language and help shape what comes next.