> ## 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 a graph

> Tell an agent to look at lilac-research.com, approve one link, and let it make and fill a graph. Or paste it a key for one graph.

An agent can read a graph, search it and add notes and files to it. It needs a key, and nothing else.

## Let the agent log in

Tell your agent: *"Look at lilac-research.com. I want a graph of my RL notes."* It reads [the guide](https://lilac-research.com/agents.md) and runs `npx -y lilac-graph login`, which prints a link. Open it, sign in, check the code matches, and choose **Approve**. The page says what the key opens: new graphs the agent makes, and nothing else of yours. The agent saves the key, proposes a name for the graph, and makes it once you say yes.

## Or give it a key for one graph

**1. Make a key**

Open the graph on [lilac-research.com](https://lilac-research.com), choose **Give to an agent**, and pick **Read and add** or **Read only**. The key opens this graph only. It is shown once.

**2. Paste it to your agent**

Copy the block. It names the graph, holds the key and tells the agent to run the guide first.

```bash theme={"dark"}
export LILAC_API_TOKEN=lilac_at_...
export LILAC_GRAPH=reading
npx -y lilac-graph guide
```

**3. Let it work**

The agent looks at `map`, asks `search` in plain words, reads only the parts it picked, and adds files with `add`. It writes the summary, group and links of every row it adds, so the graph stays easy to search.

> [accordion] The guide
>
> The same page is at [lilac-research.com/agents.md](https://lilac-research.com/agents.md), with `curl` examples for a machine without Node. [lilac-research.com/llms.txt](https://lilac-research.com/llms.txt) points to it.

> [accordion] What a key may not do
>
> A key reads and adds rows to its graph. It cannot make another key, reach other graphs, archive a row or change what you wrote. Delete the key in Settings to end the agent's access.

Next, [find citations and query from the CLI](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.