@ainetwork/ork
v0.3.8
Published
Ontology-based deterministic reasoning toolkit.
Readme
ain-ork
ain-ork is a TypeScript toolkit for ontology-based, deterministic reasoning with:
- domain packs
- ontology-grounded planning
- baseline strategies
- reasoning runs
- MCP tool exposure
The runtime treats ontology as load-bearing data. Each baseline recipe/
statistic is an asset with an inline ontology binding; the reasoner grounds
an incoming query against the ontology, expands related fact scopes through
concept relations, and selects the highest-scoring baseline asset.
Authoring shape:
ontologycarriesconceptsandrelationsonly. Concepts can declaremetricKeys/scopeIds(used to seed the concept closure) andparentIds(traversed asis_a).ontology.relationsusefromConceptId/toConceptId; the closure traverses all outgoing relations from grounded concepts.statistics: []is the single source of truth for computed baselines. Each statistic is{ id, model, binding? }(the v1 name wasbaselines: [], each entry{ id, recipe, binding? }). Narrative text is authored on each statistic'ssentenceTemplates(slot code → template) and theoutcomeBands/expectedBands/anchorBandstemplates on itsmodel— see docs/design.md. (A declarativesentences: []"condition / sentence / range label" rule-evidence chain — v1 namerules: []— existed alongside this and was removed 2026-09-09: zero authored entries in any domain since 2026-08-10. A stored revision that still carries the key parses with it dropped.)
The first implementation in this repository focuses on:
- a reusable
core - an ergonomic
sdk - a MongoDB adapter contract
- an MCP-facing tool layer
There is no shared examples/ directory and no built-in ontology/reasoning
graph builder — domain-pack fixtures live inline in tests/, and node
identity / edge vocabulary for any graph view is left to the consumer (built
from definition.ontology, definition.statistics and their inline
bindings, and the compile-time reference sets a connector's /meta route
exposes — referencedValueKeys/externalScopes, see DomainPack in
core/domain-pack.ts). validateDefinition (sdk/validation.ts) is the
static schema + reference lint a consumer runs before persisting a candidate
definition. See "stay thin — no speculative abstractions" in
docs/design.md.
Key reference:
- docs/design.md — structure, design philosophy, and ain-ork's position in the broader connector / dashboard / agent stack
