---
title: Knowledge graph
order: 1
description: "The queryable graph of a workspace's spells, targets, docs, and code relationships; query it with magus query/explain/path."
tags: [glossary, insight-and-knowledge]
---

# Knowledge graph

The queryable graph of a workspace's spells, targets, docs, and code
relationships; query it with `magus query`/`explain`/`path`.

## Elsewhere

A knowledge graph in the RAG sense is usually extracted from text by a model, and Google's or
an RDF store holds facts about the world. The magus knowledge graph is built from declared
sources and code indexes without a model, so the same tree always yields the same graph.

## Example

```sh
magus query "kind=spell"
```

## Used in

<!-- BEGIN GLOSSARY USAGE (generated by glossary-usage-generate from the knowledge graph; edit the generator, not this list) -->

In the docs:

- [Knowledge graph](../concepts/knowledge.md#knowledge-graph)

<!-- END GLOSSARY USAGE -->

## See also

- [MAGUS.md](magusmd.md)
- [Insight](insight.md)
- [Knowledge graph](../concepts/knowledge.md)
