Knowledge sources
Plain AI becomes significantly more powerful the more information it has about your product.
By default, Plain AI will use all information in your Help Centers, but you can also teach Plain about your product by adding knowledge sources in Plain AI → Knowledge Sources.
Indexing your documentation
To make sure Plain AI has access to your entire help site, you can index your documentation by providing either individual page URLs or a sitemap.
In most cases, we recommend adding your documentation via a sitemap, because this allows us to automatically detect and index all your help pages at once. If any pages are added or removed in your docs, re-indexing your sitemap will update what’s available in Plain.
Your sitemap is usually found at a URL like https://your-docs.com/sitemap.xml.
You can add your own documentation under Plain AI → Knowledge sources.
Re-indexing
Knowledge sources are automatically re-indexed every week, so changes to your documentation will be picked up.
If you need to request re-indexing outside of this, you have two options:
Manually via the Plain web UI
Navigate to Plain AI → Knowledge sources. From here, open the overflow menu (three dots) for any knowledge source and select Refresh source.Automatically via the Plain CLI
Use the CLI to index documentation programmatically – ideal for bulk updates or automation.
CLI automation example
If your documentation changes frequently or you manage a large help site, you can automate re-indexing with the Plain CLI. For example, you can trigger indexing whenever your documentation is updated.
For setup instructions, see the Plain CLI documentation.
Here is an example GitHub Action that indexes documentation every 3 hours:
name: Index docs on: schedule: - cron: '0 */3 * * *' jobs: index: name: Index Documents runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '22' - name: Install CLI run: npm install -g @team-plain/cli@latest - name: Index Documents run: plain index-sitemap https://www.plain.com/docs/sitemap.xml env: PLAIN_API_KEY: ${{ secrets.PLAIN_API_KEY }}
Required Permissions
The PLAIN_API_KEY needs this permission:
– knowledgeSource:create