OCRA is a prototype for turning long, messy chat threads into structured OWL ontology artifacts. The current repo demonstrates the "create" pathway: ingest an artifact, generate modelling perspectives, build TBox/ABox ontology fragments, and merge them into a unified OWL output.
The motivating question is whether agent memory can be grounded in something more inspectable than a transcript or vector store: typed concepts, relations, provenance, and mergeable symbolic structure.
This is a research prototype, not a polished product.
What works in the saved run:
- A Buddhist / Zen / phenomenology chat thread is stored in
src/inputs.ts. - The workflow decomposes the thread into ontology fragments.
- Fragment outputs are stored by the local viewer under
src/viewer/.output/when the viewer is run. - A merged OWL artifact is committed as
unified.owl. - The committed
unified.owlcontains:- 134 OWL classes
- 117 object properties
- 147 named individuals
- 782 rough direct assertion triples
What is still prototype-grade:
- The ontology is useful as an artifact, but not yet a validated production memory layer.
- Merge/repair behaviour still needs stronger consistency checks, provenance UX, and reasoner-backed validation.
- The repo contains historical debug scripts and experiment scaffolding that should be consolidated before broader public release.
src/inputs.ts— source chat thread for the saved Buddhist / Zen run.unified.owl— merged OWL output from the run.src/mastra/workflows/main.ts— full pipeline: embed artifact → generate perspectives → model → analyze → build fragments → merge.src/mastra/workflows/fragments.ts— fragment-only workflow.src/mastra/agents/— staged agents for perceiving, modelling, analyzing, building, and merging.src/viewer/— local fragment viewer/server..docs/proposal.md— original architecture proposal and category-theoretic design notes.docs/symbolic-memory-notes.md— notes on how curated/cleaned ontology views could ground symbolic memory.
Install dependencies:
bun installRun the Mastra/Convex/viewer dev stack:
bun run devRun only the fragment viewer:
bun run viewerSummarize the committed OWL artifact:
python3 scripts/summarize_owl.py unified.owlTypecheck:
bunx tsc --noEmitPortfolio images and extracted source-thread artifacts are currently generated in the recruiting workspace rather than committed here:
/Users/jesselee/dev/dd/recruiting/narrative/assets/ocra/
The useful page assets are:
- curated ontology map — readable view of the Buddhist/Zen semantic structure
- full OWL hairball — dense WebVOWL-style proof of the unified artifact
- source thread excerpt/full transcript — grounding input for the retrospective writeup
The dense unified.owl graph is good evidence that the prototype can decompose a large philosophical conversation into symbolic structure. The curated/minimal graph is probably more useful for downstream memory: it exposes the stable conceptual spine while hiding low-value assertion noise.