> For the complete documentation index, see [llms.txt](https://docs.clearfeed.ai/clearfeed-help-center/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/knowledge-sources/indexing-knowledge-sources/confluence.md).

# Confluence

<details>

<summary>Prerequisite - <strong>Integrating with Confluence</strong></summary>

To index your Knowledge Source, you must integrate your Confluence account with ClearFeed. Begin this on the ClearFeed web app:

* Navigate to `Settings` from the nav-bar, and proceed to the [Integrations](https://web.clearfeed.app/settings/integrations) tab.
* Within the list of available integrations, locate and select **Confluence.**
* Click the `Connect` button to open the input modal.
* Provide the following details:
  * **Confluence email** of the user generating the access key
  * **Select the Token Type:**
    * **Classic: API Key / Personal Access Token** (PAT) for the Confluence account
    * **Scoped:** The token must include the following scopes which are required to access spaces and pages for KS indexing.
      * **read:space:confluence**
      * **read:page:confluence**

{% hint style="info" %}
**Note:** ClearFeed will only read the pages/spaces you select when creating a Knowledge Source. We do not index all Confluence data by default.
{% endhint %}

* Upon entering these details, click the `Connect` button within the modal.
* Successful integration redirects you back to ClearFeed's web app, where a confirmation message is displayed.

<figure><img src="/files/oeelQbLvTBSmlL2R2xNF" alt="" width="434"><figcaption><p>Integrate ClearFeed with Confluence</p></figcaption></figure>

</details>

### **Indexing a Confluence Knowledge Source**

With the integration complete, you can now index your Knowledge Source:

<figure><img src="/files/sqXrDDa1PtHDcuwYpDKG" alt="" width="563"><figcaption><p>Indexing a Confluence Knowledge Source</p></figcaption></figure>

**Step 1**: **Add your first Knowledge Source**

* From the left navigation bar on the ClearFeed WebApp, go to **AI >** [**Knowledge Sources**](https://web.clearfeed.app/knowledge-sources)**.**
* Hover over the "Add Knowledge Source" dropdown at the top right corner to select `Confluence`.
* A side drawer will appear, prompting you to provide specific details:
  * **Name:** Assign a title for the Knowledge Source to be displayed on ClearFeed.
  * **Tags:** Use tags to categorize and structure each Knowledge Source. Customize these based on your needs.
  * **Spaces:** Choose the [Confluence spaces](https://support.atlassian.com/confluence-cloud/docs/use-spaces-to-organize-your-work/) you'd like to index. The options include:
    * Indexing all spaces.
    * Indexing specific spaces.

      <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>We currently support creating Knowledge Bases from below categories of Confluence spaces:</p><ul><li>Global</li><li>Knowledge Base</li><li>Collaboration</li></ul></div>
  * **Index pages where URL:** To index specific URLs from the selected Spaces, click "Add Condition" to filter them. You can use conditions like **"Starts with"**, **"Does not start with"**, **"Contains"**, and **"Does not contain"**.\
    If you want to index all URLs in the selected Spaces, you can skip this step.
  * **Auto Reindex Regularly:** When enabled, the particular knowledge source will reindex once every 24 hours.
  * After saving your addition, the Knowledge Source will either start indexing immediately (reflected by an **In Progress** status) or will be picked soon (reflected with an **Initiated** status). Get more details on Managing Knowledge Sources [here](/clearfeed-help-center/clearfeed-ai/knowledge-sources/managing-knowledge-sources.md).
* **Reindexing Confluence Docs -** To reindex Confluence documents, manually reindex the knowledge source by clicking the "Reindex" button next to it.

  <figure><img src="/files/huaIDIbuPI2Ogf92YfFB" alt=""><figcaption><p><strong>Reindexing Confluence Docs</strong></p></figcaption></figure>

### Using AI Agents

Once you've configured the knowledge sources, learn how to build and use AI Agents

{% content-ref url="/pages/BG6lBe8zAALu5HQvWnQQ" %}
[Build AI Agents](/clearfeed-help-center/clearfeed-ai/ai-agents/build-ai-agents.md)
{% endcontent-ref %}

{% content-ref url="/pages/KfSu1GlJW2NmCvxVTv5c" %}
[Use AI Agents](/clearfeed-help-center/clearfeed-ai/ai-agents/use-ai-agents.md)
{% endcontent-ref %}

### **Manage Knowledge Sources**

Once the status of the knowledge source has been indexed, learn more on how to manage the knowledge source below.

{% content-ref url="/pages/4mEyGIe8R45x3rjcY7ug" %}
[Manage](/clearfeed-help-center/clearfeed-ai/knowledge-sources/managing-knowledge-sources.md)
{% endcontent-ref %}


---

# 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://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/knowledge-sources/indexing-knowledge-sources/confluence.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.
