Skip to content

GitHub Integration ​

The GitHub integration allows your AI assistants to automatically synchronize knowledge base content from GitHub repositories. This enables your assistants to stay up-to-date with documentation, FAQs, and other knowledge stored in your GitHub repositories.

What is GitHub Integration? ​

GitHub is the world's largest platform for software development and collaboration. By integrating GitHub with your AI assistant, you can automatically sync documentation, markdown files, and other knowledge content from your repositories directly into your assistant's knowledge base.

Key Features ​

  • Knowledge Base Sync: Automatically sync documentation and content from GitHub repositories
  • File Filtering: Configure which files and folders to include in the sync
  • Real-time Updates: Keep your assistant's knowledge current with repository changes
  • OAuth Authentication: Secure connection using GitHub OAuth
  • Repository Access: Connect to both public and private repositories you have access to
  • Flexible Configuration: Customize sync settings for different repositories

How It Works ​

  1. Connect to GitHub: Authenticate using your GitHub account via OAuth
  2. Select Repository: Choose which GitHub repository contains your knowledge content
  3. Configure File Filter: Specify which files or folders to sync (e.g., documentation folder)
  4. Automatic Sync: The system regularly syncs content from your repository
  5. Knowledge Base Update: New and updated content becomes available to your assistant

Setting Up GitHub Integration ​

Prerequisites ​

  • GitHub account with access to the repository you want to sync
  • Repository containing documentation or knowledge content
  • AI assistant configured in your KI Agency platform

Step-by-Step Setup ​

  1. Navigate to Integrations

    • Go to the main menu and select "Integrations"
    • Find the GitHub integration in the available integrations list
  2. Connect to GitHub

    • Click "Connect" on the GitHub integration
    • You'll be redirected to GitHub for OAuth authentication
    • Authorize the KI Agency application to access your repositories
  3. Access Knowledge Base Section

    • Navigate to "Knowledge Base" from the main menu
    • Look for the "+" button to add new content
    • Find the GitHub integration option in the dropdown menu
  4. Configure Repository Settings

    • Click on the GitHub integration option
    • You'll see a configuration dialog for GitHub properties
  5. Set Repository Details

    • GitHub repo: Enter the repository name (e.g., username/repository-name)
    • Repo files search: Specify file patterns to include (e.g., docs/**/*.md for all markdown files in docs folder)
  6. Save Configuration

    • Click "Connect" to save your repository settings
    • The system will start syncing content from your specified repository

Configuration Options ​

Repository Selection ​

Specify the GitHub repository you want to sync from using just the repository name. The system automatically searches across all organizations and repositories you have access to:

  • documentation - Documentation repository
  • project-docs - Project documentation
  • knowledge-base - Knowledge repository

File Filtering ​

Use file patterns to control which content gets synced:

Examples:

  • **/*.md - All markdown files in the entire repository
  • docs/**/*.md - Only markdown files in the docs folder
  • **/*.{md,txt} - All markdown and text files
  • wiki/**/* - All files in the wiki folder
  • README.md - Only the main README file

Pattern Tips:

  • ** matches any number of directories
  • * matches any characters within a single directory level
  • Use file extensions to limit to specific file types
  • Combine patterns with commas: {md,txt,rst}

Best Practices ​

Repository Organization ​

  • Keep documentation in clearly organized folders
  • Use consistent naming conventions for files
  • Include a main README file for overview information
  • Structure content logically for easy navigation

File Filtering ​

  • Be specific with file patterns to avoid syncing unnecessary files
  • Focus on documentation and knowledge content (markdown, text files)
  • Exclude code files, images, and binary files unless needed
  • Test patterns with a small subset first

Content Management ​

  • Write clear, user-friendly documentation
  • Keep content up-to-date in your repository
  • Use markdown formatting for better readability
  • Include examples and step-by-step guides

Security ​

  • Only sync public information or appropriately managed private content
  • Avoid including sensitive information like API keys or passwords
  • Review repository permissions regularly
  • Use private repositories for confidential documentation

Content Synchronization ​

Sync Frequency ​

  • The system automatically checks for updates periodically
  • New commits to your repository trigger content updates
  • Manual sync options may be available through the interface

Content Processing ​

  • Markdown formatting is preserved and rendered appropriately
  • File hierarchy is maintained in the knowledge base
  • Large files may be processed in chunks
  • Binary files and images are typically excluded

Troubleshooting ​

Common Issues ​

Authentication Problems

  • Verify your GitHub account has access to the specified repository
  • Re-authenticate if the OAuth connection expires
  • Check that repository permissions allow read access

No Content Syncing

  • Verify the repository name is correct
  • Check that your file filter patterns match existing files
  • Ensure the repository contains files matching your criteria

Sync Errors

  • Review file filter patterns for syntax errors
  • Check repository accessibility and permissions
  • Verify network connectivity to GitHub

Getting Help ​

If you encounter issues with the GitHub integration:

  1. Verify your repository settings and file patterns
  2. Check the integration status in the Knowledge Base section
  3. Test with a simple file pattern like *.md first
  4. Contact your system administrator if problems persist

Example Configurations ​

Documentation Repository ​

Repository: docs
File Filter: docs/**/*.md
Description: Sync all markdown files from the docs folder

FAQ Repository ​

Repository: faq-content
File Filter: **/*.{md,txt}
Description: Sync all documentation and text files for FAQ content

Project Wiki ​

Repository: project-wiki
File Filter: wiki/**/*
Description: Sync entire wiki folder content

The GitHub integration provides a powerful way to keep your AI assistant's knowledge current by automatically syncing content from your repositories, ensuring your assistant always has access to the latest documentation and information.