NQL: one language for everything your AI needs from its memory
NQL is the Nexsus Query Language. It is the single language an AI, or a developer, uses to do everything in Nexsus: read, filter, total, search by meaning, look back in time, write, archive, restore, link records and change the structure.
Most AI memory providers give an agent a few fixed operations, such as save and search. Every bigger job then becomes many small calls, and the agent spends its effort working out how to combine them. Nexsus gives the agent a whole language, so it says what it needs in one statement.
In everyday terms. A vending machine has six buttons, and you get one of six things. At a cafe counter you say what you want in a full sentence, and it arrives as one order. Fixed tools are the buttons. NQL is being able to speak.
What one statement can do
| You want to | You say |
|---|---|
| Read exactly | SELECT title, due FROM task WHERE status = 'open' ORDER BY due |
| Total and group | SELECT status, COUNT(*) FROM task GROUP BY status |
| Search by meaning | SELECT title FROM note WHERE ABOUT 'supplier delays' AND relevance >= 0.5 |
| Look around one record | SELECT title FROM note WHERE NEAREST TO <code> |
| Read the past | SELECT status FROM task FOR SYSTEM_VERSION AS OF '2026-10-22T23:30:00Z' WHERE code = '<code>' |
| Read a record's history | SELECT * FROM HISTORY('<code>') |
| See the effect first | PREVIEW ARCHIVE FROM client WHERE code = '<code>' CASCADE |
| Add structure | ALTER MODEL task ADD COLUMN owner REFERENCES person |
How NQL strengthens each pillar
- Performance (its home). One statement instead of many calls, only the answer comes back, and every statement is checked before it runs.
- Persistence. History is part of the language, so the past is one clause away.
- Sovereignty. A published language means your memory is never trapped behind an interface only we understand.
- Security. Every statement passes the same gates before it touches your data, and access is controlled by closing doors, never by weakening the language.
- Neutrality. The same language for every AI and every developer.
- Truth. An exact statement can be read only one way, so the answer is what is stored, not a guess at what was meant.
- Auditability. Every question is a precise statement that someone else can run again and check.
- Governance. One place where every rule is applied, and no way to act that skips it.
- Transparency. The whole language is published, and your AI can read it from inside Nexsus.
For developers
NQL has 38 statement kinds, 83 keywords (18 reserved and 65 soft), 21 operators and 71 clause forms, spread across five tools:
| Tool | What it is for | Statements |
|---|---|---|
nexsus_query |
Reading, history and previews | 11 |
nexsus_write |
Changing records | 7 |
nexsus_evolve |
Changing the structure | 11 |
nexsus_govern |
Rights and closes | 8 |
nexsus_reference |
Reading the rulebook | 1 |
Every statement is parsed, checked against the tool it was sent through, and only then dispatched to PostgreSQL. The reply carries the steps taken and the time in milliseconds. From inside a workspace, DESCRIBE grammar returns the language as the engine holds it. Also in the language: CHANGES(), which lists what changed in a model between two instants, and FROM WORKSPACE(), one search by meaning across every model.
Full reference: Grammar · Refusals · Your first session
The chain. NQL → Performance → Always there → Memory you can rely on.