> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravenna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge

> Sync documentation files from selected GitHub repositories into Ravenna knowledge folders, with directory hierarchy preserved and automatic updates.

Sync documentation from your GitHub repositories to power agent responses. Select the repositories you want to import, and Ravenna ingests Markdown and text files from each one with directory structure preserved.

## What you can do

* Connect a GitHub organization or user account through the Ravenna GitHub App
* Pick exactly which repositories Ravenna can read
* Import documentation files with their folder hierarchy preserved
* Auto-sync new files, edits, and renames from the default branch

## Setup

<Steps>
  <Step title="Select GitHub as your source">
    When adding documents to a knowledge folder, select **GitHub** from the available sources.
  </Step>

  <Step title="Install the Ravenna GitHub App">
    Complete the GitHub App installation flow to grant Ravenna access to your organization or personal account.

    During installation, choose which repositories Ravenna can access. You can grant access to all repositories or pick a specific subset.
  </Step>

  <Step title="Select repositories to sync">
    After installation, choose the repositories you want to import into this knowledge folder. Repositories are grouped by owner, and you can select individual repositories or all repositories from an owner at once.

    Use **Manage repository access** at any time to add or remove repositories the GitHub App can see.
  </Step>

  <Step title="Import content">
    Supported documentation files from each selected repository are imported, preserving their directory structure.
  </Step>
</Steps>

<Callout icon="link" color="#6B7280">Learn more about [managing knowledge folders](/documentation/automate/knowledge/overview)</Callout>

## How it works

<AccordionGroup>
  <Accordion title="Supported file types" icon="file-text">
    Ravenna imports text-based documentation files from the default branch of each repository. The following extensions are supported:

    * `.md` — Markdown
    * `.mdx` — MDX
    * `.txt` — Plain text
    * `.rst` — reStructuredText
    * `.adoc` — AsciiDoc

    Code files, binaries, images, and other file types are skipped.
  </Accordion>

  <Accordion title="Hierarchy preservation" icon="folder-tree">
    The original repository structure is maintained inside Ravenna:

    * Each selected repository becomes a top-level folder.
    * Subdirectories that contain supported files are recreated as nested folders.
    * Empty directories and directories without supported files are not imported.
    * File and folder renames on the default branch are reflected during auto-sync.
  </Accordion>

  <Accordion title="Repository access" icon="lock">
    Ravenna only reads repositories you explicitly grant access to through the GitHub App. To change which repositories are available:

    1. Open the repository picker in the knowledge folder.
    2. Select **Manage repository access** to open GitHub.
    3. Add or remove repositories on the GitHub App installation page.
    4. Return to Ravenna to update your selection.
  </Accordion>
</AccordionGroup>

## Managing imported content

After import:

* Remove unwanted files or folders from your knowledge folder.
* Archive specific documents to exclude them from agent responses.
* Removed or archived documents are automatically skipped during future syncs.

<Callout icon="link" color="#6B7280">Learn more about [managing documents](/documentation/automate/knowledge/overview#managing-documents)</Callout>

## Auto-sync

When auto-sync is enabled, GitHub content stays up-to-date:

* New documentation files added to a selected repository are automatically imported.
* Edits to existing files sync to your knowledge base.
* Files deleted from the default branch are removed from your knowledge base.
* Directory reorganization is reflected in the folder hierarchy.

Only changes on the repository's default branch are synced.
