Juuri for SpaceAI: Giving Spacecraft, Robots and Mission Teams a Knowledge Graph They Can Trust

A satellite drops into safe mode at 3 a.m. The operator on shift has a few minutes to answer three questions. What caused it? What else is affected? What did we do the last time this happened? The answers exist, but they are scattered across telemetry notes, anomaly reports, supplier datasheets, procedures and years of mission emails.
This is where most AI assistants in space operations fail. A chatbot built on plain vector search can find a paragraph that looks similar. It cannot follow a chain of causes from a tripped breaker to a heater fault to a thermal limit. It cannot tell you which fact was true last March but not today. And it cannot prove that its answer came from a real document rather than its imagination.
Juuri was built for exactly this gap. Pronounced "JooRi" and named for the Finnish word for root, Juuri is a lightweight, in-memory knowledge graph library for Retrieval-Augmented Generation (RAG). Its own tagline says it plainly: knowledge graphs for RAG, nothing else. This article shows how that focus makes it a strong fit for SpaceAI, where complex, connected and safety-critical knowledge is the norm.
Why SpaceAI Needs a Knowledge Graph, Not Just a Vector Store
Space systems are graphs by nature. A spacecraft is a tree of subsystems. Every anomaly has a cause chain. Every component has a supplier, a heritage, a test history and an operating window. Every procedure depends on a configuration that changes over time.
Vector search treats all of this as loose text. A knowledge graph treats it as structure.
Table 1: Where Plain Vector RAG Breaks in Space Operations
| Operator Question | Plain Vector RAG | Juuri Knowledge Graph |
|---|---|---|
| "What is the root cause of this safe-mode event?" | Returns similar paragraphs | Walks CAUSED_BY links to the end of each chain |
| "If this reaction wheel fails, what else is hit?" | Guesses from keywords | Blast-radius traversal, backwards along causes |
| "Which config was active on 2026-03-14?" | Mixes old and new documents | "As of" queries on valid_from / valid_to |
| "Do two reports disagree on the battery spec?" | Cannot tell | Conflict detection under schema constraints |
| "Is this AI answer actually backed by a source?" | No built-in check | Claim-by-claim grounding verification |
| "Is PSLV-C37 the same as 'PSLV C 37'?" | Treats them as different text | Entity resolution with sameAs merging |
What Juuri Actually Does
Juuri stores knowledge as typed subject–predicate–object triples. Every fact carries its source, chunk ID, confidence and timestamp. A schema defines which classes and relations are allowed, so the graph stays clean. Ingestion uses a local LLM through Ollama to pull triples out of raw text, and dates are kept when the text gives them.
On top of that store, Juuri adds the pieces a mission-grade assistant needs.
Table 2: Juuri Capabilities Mapped to SpaceAI Use Cases
| Juuri Capability | What It Does | SpaceAI Use Case |
|---|---|---|
| Schema guard | Rejects undeclared relations and wrong types | Keeps a spacecraft ontology clean as data grows |
| Provenance | Source, chunk, confidence, timestamp on every fact | Audit trail for every recommendation to an operator |
| Temporal facts | valid_from / valid_to, "as of" queries, fact history | Orbit, firmware and configuration changes over time |
| Re-ingest | Replaces only one source's facts when it is edited | Updated procedures without stale facts left behind |
| Root cause | Follows CAUSED_BY chains to the end of each branch | Anomaly investigation and fault-tree reasoning |
| Blast radius | Follows causes backwards: what a failure led to | Impact analysis before commanding a robot arm |
| Paths | Finds chains between two entities within a hop limit | Tracing a sensor reading to a subsystem failure |
| Communities | Groups linked entities with cited summaries | "Tell me about the power subsystem" broad questions |
| Ask (text-to-query) | LLM writes a small JSON query; Juuri validates and runs it | Natural-language questions without the LLM writing code |
| Verify | Checks each claim in an answer against retrieved facts | Stops hallucinated advice reaching mission control |
| Conflicts | Flags facts that contradict schema constraints, with dates | Catching mismatched specs across agencies and vendors |
| Evaluate and tune | Hit rate, coverage, precision, MRR against gold answers | Proving retrieval quality before flight use |
| Export | Turtle / OWL and a one-way NetworkX graph | Sharing ontologies with partners and analysis tools |
A Spacecraft Ontology in a Few Lines
The real power of Juuri starts with the schema. Here is a simple ontology for a satellite with a robotic servicing arm:
import juuri as jr
schema = jr.Schema(
classes=["Spacecraft", "Subsystem", "Component", "Anomaly", "Supplier", "Procedure"],
relations={
"PART_OF": ("Component", "Subsystem"),
"BELONGS_TO": ("Subsystem", "Spacecraft"),
"CAUSED_BY": ("Anomaly", "Anomaly"),
"AFFECTS": ("Anomaly", "Component"),
"SUPPLIED_BY": ("Component", "Supplier"),
"RESOLVED_BY": ("Anomaly", "Procedure"),
},
constraints={"PART_OF": "functional"},
)
store = jr.TripleStore(schema=schema)
The "functional" constraint says a component can belong to only one subsystem. If two documents put the same star tracker in two different subsystems, Juuri's conflict check will surface it. In space, a contradiction like that is not a typo. It is a risk.
Table 3: Example Space Ontology Design
| Element | Example | Why It Matters |
|---|---|---|
| Classes | Spacecraft, Subsystem, Anomaly | Typed entities prevent nonsense links |
| Relations | CAUSED_BY, AFFECTS, PART_OF | Domain/range rules keep facts meaningful |
| Subclasses | ReactionWheel → Component | Specific parts still count as their parent type |
| Rules | inverse, symmetric, implies | Used in answer verification and Turtle export |
| Constraints | functional, exclusive | Drive conflict detection across sources |
| Time | valid_from / valid_to | Every fact knows when it was true |
Four SpaceAI Scenarios Where Juuri Shines
Anomaly Root-Cause Assistant Ingest years of anomaly reports. When a new event lands, call root_cause() on it and Juuri returns numbered, cited chains. Each chain flags if it is cyclic, which tells the engineer there is no single root cause and a deeper review is needed.
Robotic Arm Pre-Command Check Before a servicing robot grapples a client satellite, the planner asks what could go wrong. blast_radius() walks forward from a possible fault and lists everything it could lead to. The robot's AI gets a short, token-budgeted context instead of a pile of PDFs. This is RoboAI in practice: knowledge shaped for the machine, not for a chat window.
Multi-Agency Mission Knowledge Joint missions mean documents from different agencies, vendors and languages. Juuri keeps provenance on every fact, so an answer can say which source said what. The same fact from two sources stays one triple with two provenance records. Entity resolution merges "Chandrayaan-3 lander" and "Vikram lander" once a human approves the suggestion.
Configuration History and "As Of" Questions Spacecraft change. Firmware is patched, modes are switched, orbits are raised. With valid_from and valid_to on each fact, an investigator can ask what was true on the exact day of an event. The as_of option works across find, retrieve, paths, root_cause, blast_radius, conflicts and query.
Built for Trust, Not Just Answers
In a consumer chatbot, a wrong answer is annoying. In mission control, it can end a mission. Juuri is built around that difference.
The verify step splits an LLM answer into claims and checks each one against the retrieved facts. An answer is marked grounded only if every claim is supported. The text-to-query feature never lets the LLM write code. It writes a small JSON query that Juuri validates against the schema before running. If an entity name matches nothing, or matches several things, Juuri raises an error and lists the candidates. It never guesses.
Table 4: Trust Features and What They Prevent
| Feature | What It Prevents |
|---|---|
| Schema guard on add() | Wrong-type facts silently entering the graph |
| Provenance on every fact | Untraceable advice to operators |
| Verify (claim grounding) | Hallucinated steps in an AI-generated procedure |
| Validated JSON queries | LLM-written code running against mission data |
| No-guess entity linking | Answering about the wrong spacecraft or component |
| Conflict detection | Two sources disagreeing without anyone noticing |
| Evaluate and tune | Shipping retrieval settings that were never measured |
Why Lightweight Matters in Space
Space software often runs where big infrastructure cannot: ground stations with tight security, air-gapped labs, edge computers near the antenna, and eventually on board. Juuri is a Python library, not a server. It holds the graph in memory, saves the whole store to a single JSON file and checks it on load. It talks to a local Ollama model and embedder, so sensitive mission data never has to leave the building.
Table 5: Deployment Fit
| Requirement | How Juuri Fits |
|---|---|
| Air-gapped or sovereign data | Local Ollama LLM and embedder, no cloud calls needed |
| Small team, no DBA | pip install juuri; no graph server to run |
| Portable knowledge snapshots | One JSON file per store, checked on load |
| Partner and tool interoperability | Turtle / OWL export and NetworkX conversion |
| Swappable models | Any object with complete() or embed() plugs in |
Honest Limits
Juuri is at version 0.4, and its own documentation says the API is early and may change. The graph lives in memory, so very large fleets will need sharding or a future storage layer. Transitive rules are stored and exported but not yet applied in reasoning. Communities use a single flat level of Louvain clustering, not a hierarchy. The query language has no OR, NOT or counting yet. And a wrong query that is still valid will run and return wrong rows, so teams must test it with their own models.
None of these are hidden. They are written in the README, which is exactly the kind of honesty a safety-minded field needs from its tools.
The Bottom Line
SpaceAI is not about bigger chatbots. It is about machines and people making the right call with connected, time-aware and verifiable knowledge. Juuri brings that discipline to Retrieval-Augmented Generation in a package small enough to run next to an antenna and strict enough to sit behind mission control.
As India and Canada deepen their work on space robotics and AI, tools like this will decide whether those robots act on evidence or on guesses. Juuri's answer is simple: start from the root.
Juuri is open source under the MIT licence on GitHub at kactlabs/juuri, with full documentation on DeepWiki.