EQL Reference
EQL (Epistemic Query Language) is the query language for EpistemicDB. It operates on epistemic primitives — Knowledge Objects (KOs), gaps (Q-KOs), bonds, and molecules.
FETCH — Retrieve knowledge objects
FETCH KO
WHERE entity = "pricing"
AND decay_score > 0.35
AS projection DYNAMIC
ORDER BY K DESC
LIMIT 10Targets: KO, D-KO, MOLECULE
Projections: STRUCTURAL, DYNAMIC, CONSTRAINT, COMPOSITIONAL
OPEN GAPS — Find blocking unknowns
OPEN GAPS
WHERE blocking ANY DECISION
AND urgency > 0.60
ORDER BY urgency DESCReturns Q-KOs (questions) ordered by urgency. The urgency field and blocking condition are only valid in this context.
PROJECT DECAY — Forward-looking staleness
PROJECT DECAY
WHERE entity = "ai-triage"
AND decay_score_at(+30d) < 0.35
RETURN ko, owner, decay_velocityProjects decay scores into the future. decay_score_at(+30d) computes what the decay score will be in 30 days.
Both forms are valid:
decay_score < decay_score_at(+30d)— function on rightdecay_score_at(+30d) < 0.35— function on left
COMPOSE — Trigger D-KO synthesis
COMPOSE
FROM MOLECULE
WHERE coherence > 0.70
AND reaction_potential > 0.78
USING OPERATOR DERIVEOperators: DERIVE, MERGE, CONTRADICT
Both coherence and reaction_potential conditions are required.
WATCH — Live subscriptions
WATCH KO
WHERE entity = "pricing"
AND decay_score < 0.40
AS projection STRUCTURALCreates a live subscription. Events are pushed via WebSocket when matching KOs change.
Epistemic Classes
| Class | Decay | Half-life |
|---|---|---|
| DECISION | none | never |
| EVIDENCE | exponential | 365d |
| OBSERVATION | exponential | 90d |
| HYPOTHESIS | exponential | 120d |
| PLAN | exponential | 180d |
| CONSTRAINT | none | never |
| NARRATIVE | none | never |
| Q_FACTUAL | inverse | urgency grows |
| Q_DECISION | inverse | urgency grows |
| Q_STRATEGIC | inverse | urgency grows |
Duration Literals
+30d (30 days), +1w (7 days), +1m (30 days), +1y (365 days)
Negative values: -7d (7 days ago)
Comments
-- This is a comment
FETCH KO WHERE decay_score > 0.35 -- inline comment