Article illustration 1

The Growing Need for Live Knowledge Graphs

In modern AI pipelines, Retrieval‑Augmented Generation (RAG) has become the backbone of context‑aware assistants. Instead of static embeddings, RAG systems query a knowledge graph that reflects the current state of a codebase or documentation set. Yet, keeping that graph up‑to‑date is a manual, error‑prone chore.

Enter MemVault Sync, a lightweight GitHub Action that bridges the gap between your repository and a MemVault Knowledge Graph. By automatically syncing markdown files and source code on every push to main, it guarantees that AI agents built on top of MemVault have the freshest context.

"Automatically index repository knowledge into your MemVault GraphRAG vault." – MemVault Sync documentation

How the Action Works

The action runs on an ubuntu-latest runner and performs four key steps:

  1. Checkout – pulls the latest commit.
  2. Authenticate – uses a repository secret MEMVAULT_API_KEY to safely communicate with MemVault’s API.
  3. Filter – optional file_paths glob allows you to target only docs (docs/**/*.md) or specific source files.
  4. Push – sends the selected files to the configured api_url.

Below is a minimal workflow configuration that syncs documentation changes only:

name: Sync to MemVault
on:
  push:
    branches: [ main ]
    paths:
      - 'docs/**'          # Sync when docs change
      - 'src/**/*.ts'      # Or specific code files

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: MemVault Sync
        uses: jakops88-hub/memvault-sync@v1
        with:
          memvault_api_key: ${{ secrets.MEMVAULT_API_KEY }}
          file_paths: "docs/**/*.md"
          api_url: "https://memvault-demo-g38n.vercel.app/api"

Configuration Options

Input Description Required
memvault_api_key API key from the MemVault Dashboard. Yes
file_paths Glob pattern for files to sync. No (defaults to **/*.md)
vault_id Specific Vault ID when using multiple vaults. No
api_url Base URL for the MemVault API. No (defaults to https://api.memvault.com)

These parameters give teams granular control over what gets indexed, enabling a “push‑only on change” strategy that keeps the graph lean and relevant.

Security and Compliance

The action stores the API key as a GitHub secret, ensuring it never lands in the repository history. Because the action communicates over HTTPS, the data in transit is encrypted. For organizations with strict compliance needs, the api_url can point to an on‑premises MemVault instance, keeping all data within the corporate firewall.

Use Cases

  • AI‑powered documentation assistants that can answer questions about the latest code.
  • Automated code review bots that reference the most recent function signatures.
  • Continuous integration pipelines that update a knowledge graph before deploying a new version of a library.
  • Developer onboarding tools that surface up‑to‑date examples and best‑practice snippets.

The Bigger Picture

While MemVault Sync focuses on GitHub, the same pattern applies to any CI/CD system that can emit file changes. As the AI ecosystem matures, having a live, version‑aware knowledge graph will become a standard prerequisite for robust RAG solutions.

Getting Started

  1. Generate an API key in the MemVault Dashboard.
  2. Add the key as a repository secret named MEMVAULT_API_KEY.
  3. Create the workflow file above in .github/workflows/memvault.yml.
  4. Push to main and watch your docs and code flow into MemVault.

The action is released under the MIT license, so you can freely fork, modify, and contribute.

Source: https://github.com/marketplace/actions/memvault-sync