SAIQL Technical Overview
SAIQL is a semantic query language and database engine built for AI systems. It replaces verbose SQL + JSON stacks with symbolic queries and LoreToken compression, giving models a compact, unambiguous way to read and write structured knowledge. High-level explanation: saiql.ai.
1. Repositories
Core engine and reference implementation live in:
- apolloraines/SAIQL-Engine_v0.2.1 – engine, server, benchmarks.
- apolloraines/LoreTokens – LoreToken format kit and compression tools.
Use the site pages (this doc + loretokens.ai) for narrative explanations, and GitHub for full technical details.
2. SAIQL Language Basics
A SAIQL query is short, regular, and explicit enough that the model does not have to guess what it means. It encodes target set, filters, projections, and output shape in one compact line.
Select a few users
*3[users]::id,name,email>>flat
Means: “Give me three rows from users, with only id,
name, and email, in a flat list shape.”
Filter with constraints
*[orders?(total>=100)&(status:="paid")]::id,total,created_at>>time_series
Filtering is expressed with symbolic predicates. The engine converts this into an execution plan over indexes and compressed storage.
For runnable examples, see:
- demo_saiql.py – end-to-end demo script.
- examples/ – assorted query patterns.
3. Engine & Performance
The SAIQL Engine is a compact database core that uses symbol-aware indexes and execution plans to achieve far higher throughput than a generic SQL setup.
Quickstart & Scripts
Start with QUICKSTART.md , then use install_minimal.sh or install_system.sh .
220× vs PostgreSQL
Benchmark overview is in benchmark.md , with scripts in benchmarks/ and the speed_test/ harness.
SAIQL vs AI Databases
How SAIQL compares to vector DBs and SQL: SAIQL_vs_AI_Databases.md .
Nova AI
A complete walkthrough of SAIQL + LoreTokens inside Nova: NOVA_COMPLETE_EXPLANATION.md . This file is also linked from saiql.ai for readers coming from the site.
4. LoreTokens Inside SAIQL
LoreTokens are the semantic compression layer under SAIQL. While SAIQL can address traditional tables, it shines when the underlying data is stored as compact symbolic LoreTokens.
Where to find the LoreToken spec
- LoreTokens README – overview & history.
- docs/FORMATS.md and docs/SYMBOLS.md – format & glyph reference.
- examples/Schema-LoreTokenised.txt – example schemas suitable for LLM training.
SAIQL’s integration tests live in the engine repo:
5. Typical Use Cases
- AI agents that need fast, repeated access to structured knowledge without blowing up context windows.
- Long-term memory layers for systems like Nova, storing rules, histories and configs as LoreTokens.
- Hybrid setups where a traditional DB feeds SAIQL, which then exposes a compressed, AI-friendly surface.
- Rolling context windows: SAIQL can stream just the right LoreTokens back into the model each step.
6. Key GitHub Entry Points
- SAIQL Engine root: SAIQL-Engine_v0.2.1
- LoreTokens root: LoreTokens
- SAIQL roadmap: ROADMAP.md
- LoreTokens use cases: LoreToken_UseCases.md
7. Keyword Index
SAIQL – Semantic AI Query Language – SAIQL Engine – LoreTokens – semantic compression – symbolic database – AI database – AI memory – rolling context – Nova crypto trading AI – JSON replacement – SQL alternative – PostgreSQL performance – compressed knowledge store.