> ## 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.

# Give an agent your reading

> Find citations, then let an agent query the graph in a few hundred tokens.

This guide outlines how to make a graph useful to an agent: connect rows with citations, then show the agent a ranked slice instead of the whole list. You need a graph with a few rows from the [quickstart](https://docs.lilac-research.com/cli/quickstart.md).

```mermaid theme={null}
flowchart LR
  a["<b>link</b><br/>find citations"]:::neutral --> b["<b>query</b><br/>rank rows"]:::neutral --> c["<b>Agent</b><br/>reads, writes overviews"]:::plum
```

**1. Find citations**

```console theme={null}
$ lilac graph link --all
language-models-are-few-shot-learners: cites 1 (openalex 1, text 1)
attention-is-all-you-need: cites 0 (openalex 0, text 0)
2 rows scanned, 1 edges: openalex only 0, text only 0, both 1
```

**OpenAlex** reads each paper's reference list. **Page text** looks for another row's arXiv id, DOI, repository path or title. Neither needs a model. A scanned row is not scanned again unless you pass `--force`.

**2. Query**

```bash theme={null}
lilac graph query "benchmark for code agents" --budget 500 --tag evaluation
```

Use the words a row would use, because ranking is lexical. A line `via: <id> (neighbor)` marks a row reached through an edge instead of a word.

**3. See what is new**

```console theme={null}
$ lilac graph frontier
[ ] language-models-are-few-shot-learners  2020-05-28  Language Models are Few-Shot Learners  #models
```

> [accordion] What the agent does with the graph
>
> The graph skill tells an agent to run `tags`, then `query`, then `frontier`, and to write only what it owns: an overview, entities, related rows and tag suggestions. `lilac graph entities` lists the shared names it should reuse.

> [accordion] Tag suggestions
>
> An agent proposes a cluster with `lilac graph tag suggest <tag> <id>... --reason "<why>"`. You see it in `lilac graph tags`, then run `tag confirm <tag>` to keep it or `tag dismiss <tag>` to stop it being suggested again.

Next, run the same project on a [remote machine](https://docs.lilac-research.com/cli/guides/run-on-a-remote-machine.md).


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