# Link documentation

An agent can point from the documentation in your repository to notes and documents in Lalabase.
This also works with a read-only token, since the writing happens in your repository.

## How it works

Ask the agent to search the knowledge:

> Search Lalabase for the note on the auth architecture and link it in the README.

`search_knowledge` returns a ready link for each hit, for example
`lalabase://note/00000000-0000-4000-8000-000000000051`. The agent inserts it unchanged as a normal
markdown link:

```markdown
See the [auth architecture](lalabase://note/00000000-0000-4000-8000-000000000051).
```

On the next sync, Lalabase turns it into a link to the note in the app. This needs a
[connected repository](https://lalabase.com/docs/en/guides/repositories/connect).

## What to watch for

- The link works only with the unchanged text from the answer.
- The search goes by title. If the agent finds nothing, give it part of the title.
- Without read access to notes or documents there are no hits, not even titles.
