Cairn / Docs / Knowledge Graph

Knowledge Graph

A workspace-level view that surfaces every relationship between your projects, notes, tasks, and tags. Force, Radial and 3D layouts, click-to-navigate, neighbourhood focus, and full MCP access for AI research traversal.

What is the Knowledge Graph?

The Knowledge Graph is a workspace-wide view — not scoped to a single project. It maps every entity (projects, notes, tasks, tags) and every relationship between them: explicit links you've created, co-mentions detected automatically, shared tags, and more.

Unlike Idea Flow (which is a per-project freeform canvas), the Knowledge Graph is read-oriented — it helps you explore and understand what exists across your entire workspace. You can click any node to open a detail panel and navigate directly to the source.

Opening the Knowledge Graph

Click Knowledge Graph in the bottom section of the left sidebar (below the project list, above Settings). The keyboard shortcut is ⌘8 with the default view order (the number depends on which views you have visible). The view loads all entities across all projects in the active workspace.

Knowledge Graph force-directed view showing workspace relationships
The force-directed graph view — clusters of related notes, tasks, and projects emerge naturally.

Visualisation modes

Switch between modes using the layout selector in the toolbar:

Mode Description
Force graph A raw D3 canvas layout that stays responsive on large graphs. Nodes repel and edges act as springs, and each project's members are wrapped in a soft convex-hull outline (toggleable via the Hulls control). Best for exploring unknown structure.
Radial (sunburst) A drill-down sunburst: Workspace at the centre, projects and a shared Tags branch around it, notes and cards on the outer ring. Click a branch to drill in (rings expand with readable labels) and the hub or breadcrumb to zoom back out — smoothly animated both ways. Background refreshes keep your drilled-in branch.
3D A rotatable, zoomable WebGL scene — drag to orbit, scroll to zoom, drag nodes. It shares colours, spacing and selection highlighting with the Force view, supports the Hulls toggle (a translucent hull around each project cluster), and the 3D engine only loads when you open it.
Looking for Timeline, Matrix, or Table?

These views moved to the Insights view (⌘9 by default) in v0.7.4, alongside further analytics canvases.

Neighbourhood mode

Select any note, task, tag or project and choose Show neighbourhood in the side panel to see only what is within 1, 2 or 3 links of it. Pick the number of links from the chip in the toolbar, and press Esc or the chip's close button to return to the whole graph. Projects and tags are shown when they connect to what you are looking at, but the view does not spread out through them.

Navigating the graph

Filtering

Use the filter panel (toolbar, right side) to narrow what's shown:

Filters apply across both visualisation modes. The active filter state is preserved when you switch modes.

Auto-discovered relationships

In addition to explicit links you create (note-to-task links, MCP-created edges), Cairn automatically detects several types of relationships:

Tags appear as their own nodes in the graph with edges to all tagged entities — this is structural, not auto-discovered.

Auto-discovered relationships are shown with a dashed edge style to distinguish them from explicit links. Toggle them off via the relationship type filter if you want to see only your intentional connections.

The graph stays current

The graph reloads when your data changes — edits to notes, tasks and tags, or writes from an agent, sync or the MCP server — keeping your filters, and background refreshes never blank the canvas. Relationship recomputation after a note save only re-examines the note you changed and the notes that mention it, and deleted notes are dropped from the graph. The layout is calculated in a background worker, so the app stays responsive while a large graph settles, and the graph remembers its layout until you restart Cairn.

MCP tool reference

One MCP tool exposes the Knowledge Graph to AI clients and external scripts (since v3.1.3 it replaces the older get_knowledge_graph and get_neighbors tools):

Tool Read / Write Description
get_graph Read With a nodeId (note, card, project or tag): its N-hop neighbourhood (depth 1–3, default 1); with semantic: true instead, notes similar in meaning. Without a nodeId: the whole workspace graph, scoped with projectIds, nodeTypes and edgeTypes. includeAuto (default true) controls whether auto-discovered relationships are included.
Research with a neighbourhood

When an AI client needs context around a specific note or task, get_graph with a nodeId and depth: 1 or 2 is more efficient than loading the full graph. Start from a known node ID and expand outward only as needed.