> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lilac-research.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Graphs

> A graph is a folder of Markdown rows joined by citations, stored in the platform database and cloned into projects.

A **graph** is a folder of Markdown files, one per thing you read: a paper, post, video or repository. A row is a plain file, so you can read it, edit it and open the folder in Obsidian.

```mermaid theme={null}
flowchart LR
  p1["Paper 1"]:::neutral -->|cites| p2["Paper 2"]:::neutral
  p1 -->|cites| p3["Paper 3"]:::neutral
  p2 -->|cites| p4["Paper 4"]:::neutral
  p3 -->|cites| p4
  p5["New, uncited"]:::spark
```

The highlighted row is on the **frontier**: nothing cites it yet, so it is where the work is moving. An **edge** is derived from the rows when the graph is read, never stored: `cites` (set by `lilac graph link`), `related` (set by hand or by an agent) and `entity` (two rows that name the same entity).

## Rows and lists

A **list** is the folder a row sits in. Moving a row between lists is moving a file.

| List | Meaning |
| - | - |
| `items/` | The graph itself. |
| `backlog/` | The inbox: same format, not in the graph yet. |
| `archive/` | Pruned rows, kept but out of the graph and search. |

```markdown .lilac/graphs/reading/items/attention-is-all-you-need.md theme={null}
---
title: "Attention Is All You Need"
kind: paper
links:
  - https://arxiv.org/abs/1706.03762
tags: [models]
suggested_tags: []
entities: [Transformer]
cites: []
---
My own notes: the text before the first heading.

## Overview
A short summary an agent wrote.
```

Each part has one owner, so a person and an agent can edit the same row safely.

| Part | Owner |
| - | - |
| Text before the first heading, `tags` | You |
| `suggested_tags`, `## Overview`, `entities`, `related` | An agent |
| `cites` | `lilac graph link` |
| Title, authors, dates, `## Abstract` | `lilac graph add` |

`suggested_tags` never count as tags until you confirm them with `lilac graph tag confirm`.

## How graphs are stored

The platform database is the single source of truth. A project's `.lilac/graphs/<name>/` is a clone of it, and three commands keep the two in step.

```mermaid theme={null}
flowchart TB
  db[("<b>Platform database</b><br/>source of truth")]:::key
  a["Project A<br/>.lilac/graphs/reading/"]:::neutral
  b["Project B<br/>.lilac/graphs/reading/"]:::neutral
  db -->|clone, pull| a
  a -->|push| db
  db -->|clone, pull| b
  b -->|push| db
```

1. Run `lilac graph clone <name>` once per project to create the clone.
2. Edit the clone with `lilac graph` commands, or let an agent edit the rows.
3. Run `lilac graph pull` to bring it up to date.
4. Run `lilac graph push` to send your changes. It pulls first.
5. Read `.cache/conflicts/` when a pull reports a conflict. The database won; your text is kept there.

A row changed on both sides keeps the database version. A row changed on one side only is copied across. Rows are never deleted on the server; archiving moves a row to `archive/`.

Next, put a graph to work in [give an agent your reading](https://docs.lilac-research.com/cli/guides/give-an-agent-your-reading.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.