# Links and graph

> Link pages with wikilinks and typed relations, see backlinks, and explore the knowledge graph Cozy builds from your Markdown.

Cozy builds a graph from the links in your pages every time one is saved.
There's nothing extra to run. The structure comes from plain Markdown, so the
files stay portable.

## Wikilinks [#wikilinks]

Link to another page with double brackets:

```markdown
See [[wiki/projects/api.md]] for the API.
Ask [[Ann Lee]] about the rollout.
Read [[wiki/projects/api.md|the API plan]] first.
```

A link can name a path, a path without `.md`, a file name, a page title or an
alias. Matching ignores case and accents, so `[[maria lopez]]` finds a page
titled María López. A link that matches nothing is broken, and Health lists
it. Links inside code spans and code blocks are treated as examples and
ignored.

## Typed relations [#typed-relations]

A typed link says how two pages relate, not just that they do. Write one in
any of three ways:

```markdown
---
owner: "[[wiki/people/ann.md]]"
---
- depends_on:: [[wiki/projects/api.md]]
- decided_in:: [[Kickoff 2026-11-04]]
[[Billing service]] | owned_by | [[Platform team]]
```

- **A frontmatter key** whose value is a wikilink.
- **A relation line**: `relation:: [[target]]`, from this page.
- **A triple**: `[[a]] | relation | [[b]]`, between two other pages. It's
  handy on an index or a meeting note.

Use short, lowercase relation names so filters stay useful. Every other link
is a `links_to` relation, and a link into `sources/` is a `cites` relation.

## Conflicts [#conflicts]

When two sources disagree, write both down instead of picking one:

```markdown
CONFLICT: [[sources/a.md]] (Oct 2) says May; [[sources/b.md]] (Oct 9) says June.
```

Cozy counts `CONFLICT:` lines, and Health shows them until someone resolves
them.

## Backlinks [#backlinks]

Below every page, **Connected pages** lists what it **Links to**, what it's
**Linked from**, and the **Evidence** it cites. Agents get the same with
`cozy_backlinks`, or all at once with `cozy_context`.

## Graph view [#graph-view]

Open **Graph** in the sidebar to see pages, people, projects and sources and
how they connect. Typed relations are drawn darker.

- Choose a page type in the legend to show only that type.
- Turn on **Show sources** to include evidence.
- **Find a page** highlights a page by name. Select a page to open it.
- Use **+** and **−** to zoom, and **Reset** to start over.

Agents explore the same graph with `cozy_graph`, up to three links away,
filtered by type, tag or relation.

