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

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.