> For the complete documentation index, see [llms.txt](https://replai-1.gitbook.io/replai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://replai-1.gitbook.io/replai-docs/connectors-sources/gitbook-connector.md).

# GitBook connector

## GitBook connector

Use the GitBook connector to sync documentation into Replai.

It is the fastest launch path for most docs teams.

### What do you need first?

You need:

* A GitBook personal access token
* `content:read` permission on that token
* Access to the GitBook organization and spaces you want to sync

### How do you connect GitBook?

{% stepper %}
{% step %}

### Create the token

Create a GitBook personal access token.

Make sure it includes `content:read`.
{% endstep %}

{% step %}

### Add the token in Replai

Choose **GitBook** in Replai.

Paste the token and continue.
{% endstep %}

{% step %}

### Select spaces

Pick one or more spaces from the same GitBook organization.

One connector can cover multiple spaces in that organization.
{% endstep %}

{% step %}

### Choose the page scope

Select **All pages** or a specific subset.

Then run the first sync.
{% endstep %}
{% endstepper %}

### How does page scope work?

If you select **All pages**, new pages in that space sync automatically.

If you select a subset, new pages must be selected manually later.

{% hint style="info" %}
If you want to change the selected spaces or pages later, re-enter the GitBook token first.
{% endhint %}

### How do citations work?

Answers cite the underlying GitBook page.

Clicking the citation chip opens the original GitBook page.

### What should you check after the first sync?

Check page titles, page count, and obvious duplicates.

Clean page boundaries improve answer quality and citations.

### Related links

* [Sources overview](/replai-docs/connectors-sources/sources-overview.md)
* [Sync & scheduling](/replai-docs/connectors-sources/sync-and-scheduling.md)
* [Troubleshoot connectors](/replai-docs/connectors-sources/troubleshooting-connectors.md)
* [Citations](/replai-docs/answers-and-grounding/citations.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://replai-1.gitbook.io/replai-docs/connectors-sources/gitbook-connector.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
