The Ontology & Portable Memory
Status: ๐ญ designed. This page describes the memory layer Pinard is building toward (the
memory-layerchange). The shipped memory system is Memory & Recall.
For a fleet’s knowledge to be queryable and portable, it has to be typed. Pinard types memory with a layered ontology and ships it as versioned, portable subsets.
L1 ยท pinard-core
L2 ยท repository ontology
Learned types
Human-reviewed promotion
Portable agent ยท one versioned unit- L1
pinard-coreโ the small, stable operational trunk shared by every agent. - L2Repository ontology โ domain concepts branch from and subclass the core.
- โLearned โ promoted โ only a reviewed, proven domain type is grafted toward core.
- โฃPortable agent โ runtime,
process.js, and scoped memory are versioned together.
Why layered
A single flat ontology forces a false choice: either it is generic and useless, or it bakes one domain’s specifics (say, GWAS/HPC terms) into what should be shared by everyone. Pinard splits it into two layers instead.
Layer 1 โ pinard-core
Repo-agnostic, agent-operational concepts that mirror the primitives of a semi-deterministic loop. Small and stable, versioned centrally in Pinard:
- Entities:
Task/Step,Verdict/Decision,Gate(a breakpoint),Action,Diagnosis,LogPattern,EnvironmentCondition,Artifact. - Edges:
DependsOn,Produces,Consumes,IndicatesProblem,ResolvedBy,RequiresCondition,TriggersDecision.
Layer 2 โ per-repo domain
Each repository defines its own ontology that subclasses core and lives next to
its process.js. For example, a GWAS pipeline repo might define:
SlurmJobis-aTask/executionShardThresholdDecisionis-aDecisionGWASStudyis-aArtifactProvenanceRecord
Granularity is per-repo by default (a per-process override only where a process
genuinely diverges; per-agent is too granular). A data-pipeline mid-layer between
core and domain is deferred but intended.
Lifecycle: prescribed โ learned โ promoted
Types are not frozen. They move through a lifecycle:
- prescribed โ declared up front (core, or a repo’s domain);
- learned โ new types emerge during
/teachingsessions; - promoted โ a proven domain type is elevated toward core.
Promotion domain โ core is human-gated (a git PR), and a suppressed_types list
retires types that stop earning their place. This is the same recurrence-plus-review
pattern used for rule and scope promotion.
Portable memory subsets
This is the payoff of a single, embeddable store of record. The central memory (SurrealDB server) can be subset โ scoped to a repo or pipeline โ into a specialized embedded SurrealDB file that an agent loads locally.
That makes a pinard agent a self-contained, reproducible artifact:
pinard agent = harness + babysitter process + memory subset
(the runtime) (the loop, process.js) (embedded, scoped store)
All three are versioned together (e.g. in ExoHub), so an agent-centric data pipeline is reproducible and auditable: you can rebuild exactly the agent, its loop, and the knowledge it had at a given version.
Version-stamping
Every portable subset version-stamps both the pinard-core ontology version and
the domain ontology version it was extracted under. A migration policy governs what
happens when core or domain versions change under an already-shipped subset โ new,
load-bearing scope that portability introduces.
Next
- Teaching & Curation โ how knowledge is captured, curated, and promoted.
- The Layered Memory Architecture โ where the ontology sits in the stack.