tancheng33/dsh-ontology
dsh-ontology
A typed, inference-capable ontology (TBox + ABox) plugin for DeepSeek Harness — durable domain knowledge the agent declares, asserts against, and queries under schema constraints.
Install
npx @deepseek-ai/dsh plugin --profile <name> add dsh-ontologyRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/dsh-ontology)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from tancheng33/dsh-ontology, cleaned of badges and images.
dsh-ontology
English | 中文
A typed, inference-capable ontology for DeepSeek Harness — durable domain knowledge the agent declares, asserts against, and queries under schema constraints.
Most agent memory is a bag of strings: the agent writes prose, later reads prose, and nothing ever tells it that what it just recorded contradicts what it recorded last week. This plugin gives the agent a vocabulary it must respect. You declare what kinds of things exist and how they may relate; every claim is then checked against that model before it is stored, and claims that follow from other claims are derived rather than repeated.
ontology_define declare classes and typed relations (the TBox)
ontology_assert record entities and facts (the ABox, validated)
ontology_query look things up, traverse, infer
ontology_retract remove, with dependency protection
Why a TBox, not a notes file
| notes-style memory | dsh-ontology | |
|---|---|---|
| Structure | free text | classes, typed relations, entities, triples |
| Bad input | silently stored | rejected, naming the constraint it broke |
| Implied facts | restated by hand, drift apart | derived on read from transitive / symmetric / inverseOf |
| Retraction | orphaned prose lingers | facts cascade with their entity; derived facts vanish with their premise |
| Reading it back | grep and hope | query by class (subclass-aware), triple pattern, neighbourhood, or shortest path |
The constraint is the point. When the agent asserts ada depends_on api and depends_on is declared Component -> Component, it gets back:
REJECTED ada depends_on api: ada is not in the domain of depends_on
(requires one of: Component; has: Person)
That is a real signal — either the claim is wrong, or the model of the domain is incomplete. Free-text memory can produce neither.
Install
dsh plugin --profile <name> add dsh-ontology
dsh --profile <name>
Or from a checkout / git host:
dsh plugin --profile <name> add ./dsh-ontology
dsh plugin --profile <name> add github:tancheng33/dsh-ontology
A
github:install builds from source, so pnpm ≥10 needs the build allowlisted. AddallowBuilds: { dsh-ontology: true }to the profile'spnpm-workspace.yamland re-run, and pin a commit (#<sha>) so a later push cannot silently change what runs. Installing from npm needs no allowance.
The bundle brings its own storage stack (dsh-storage + dsh-storage-json + dsh-storage-domain) under the same row ids dsh-web-app uses, so it works in a bare profile and composes cleanly with one that already has storage. Data lands in $DSH_HOME/storages/<domain>.json.
Configuration
Override any of these in your profile's cordis.patch.yml:
…
