Skip to content
Back to skills

Kag

ASecurity

"Routes KAG knowledge-construction, question-answering, MCP, and

  • 247 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 8, 2026
toolspythongodatabase

Works with

  • cli
  • mcp

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill kag --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Kag?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Kag
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-kag/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-kag)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: kag
description: "Routes KAG knowledge-construction, question-answering, MCP, and
  benchmark workflows for the OpenSPG KAG package."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# KAG

Use this repo skill for the OpenSPG **KAG** package when the user wants to create, inspect, or use a KAG project, not when they want a generic graph database or generic RAG answer.

## What this skill covers

KAG is a Python toolkit for knowledge augmented generation with three major surfaces:

- project and schema setup through `knext`
- knowledge construction through builder chains and index managers
- query-time reasoning, MCP serving, and benchmark automation

If the task is about a KAG checkout that may be stale, read `references/repo-provenance.md` first.

## First checks

1. Confirm the package is installed with `scripts/check_kag_install.py`.
2. Inspect any `kag_config.yaml` with `scripts/inspect_kag_config.py`.
3. Read `references/configuration-and-registry.md` when you need config keys, registry names, or config discovery rules.
4. Read `references/troubleshooting.md` when imports, config discovery, model keys, or CLI behavior look wrong.

## Choose the right sub-skill

### `sub-skills/knowledge-construction/`
Use this when the user wants to create or restore a project, commit schema, run a builder, choose readers/splitters/extractors/vectorizers/writers, inspect index managers, or validate a project layout before building.

### `sub-skills/question-answering/`
Use this when the user wants to ask questions against a KAG project, inspect solver pipelines, use `knext reasoner` or `knext thinker`, or debug query-time retrieval and answer generation.

### `sub-skills/mcp-and-automation/`
Use this when the user wants to launch or validate `kag mcp-server`, plan MCP tool configs, submit builder jobs to a cluster, or dry-run benchmark automation.

## Shared files

- `references/cli-reference.md` — CLI groups, flags, and when to use each command.
- `references/configuration-and-registry.md` — config discovery, registries, and dynamic component loading.
- `references/troubleshooting.md` — cross-cutting import, config, and runtime failures.
- `scripts/check_kag_install.py` — safe install/import/CLI smoke check from any working directory.
- `scripts/inspect_kag_config.py` — redacted summary of a KAG config file.

## Runtime expectations

- The published distribution name is `openspg-kag`.
- The import names used by future agents are `kag` and `knext`.
- Console entry points are provided by the same distribution.
- `import kag` may need a discoverable `kag_config.yaml`; the bundled install check creates a temporary minimal config so the import can be tested from any directory.
- Keep runtime instructions self-contained. Do not refer future agents to original repo docs or examples outside this skill tree.

## Common requests

- "Help me set up a KAG project"
- "Which KAG index should I use for this corpus?"
- "Why is my KAG answer missing references?"
- "Can I launch KAG as an MCP server or benchmark runner?"

## Working style

- Start with a safe local check before a live server or graph mutation.
- Prefer bundled config and layout helpers over guessing from source tree names.
- Route the task to a sub-skill as soon as the workflow becomes specific.
- Keep provenance in mind before reusing the skill on a different checkout.
- Treat knowledge construction, query answering, and service automation as separate concerns until the user asks to connect them.

## When to stop and read more

- If a request mentions project creation, schema commits, builder chains, or index selection, go to `knowledge-construction`.
- If a request mentions solver pipelines, GQL queries, answer traces, or `knext reasoner`, go to `question-answering`.
- If a request mentions `mcp-server`, builder submission, or benchmark planning, go to `mcp-and-automation`.

## Provenance

Read `references/repo-provenance.md` before refreshing this skill or before deciding whether the current checkout still matches the generated knowledge.

Files in this skill

  • SKILL.md4 KB
  • references/cli-reference.md3.4 KB
  • references/configuration-and-registry.md2.6 KB
  • references/repo-provenance.md1.3 KB
  • references/repo-routing-metadata.json482 B
  • references/troubleshooting.md4.5 KB
  • scripts/check_kag_install.py7.7 KB
  • scripts/inspect_kag_config.py5.7 KB
  • sub-skills/knowledge-construction/SKILL.md3.4 KB
  • sub-skills/knowledge-construction/references/data-and-configuration.md2.8 KB
  • sub-skills/knowledge-construction/references/troubleshooting.md3.9 KB
  • sub-skills/knowledge-construction/references/workflows.md3.2 KB
  • sub-skills/knowledge-construction/scripts/validate_project_layout.py7.6 KB
  • sub-skills/mcp-and-automation/SKILL.md3.3 KB
  • sub-skills/mcp-and-automation/references/automation-and-benchmarks.md1.8 KB
  • sub-skills/mcp-and-automation/references/mcp-workflows.md1.3 KB
  • sub-skills/mcp-and-automation/references/troubleshooting.md3.3 KB
  • sub-skills/mcp-and-automation/scripts/check_mcp_config.py7.5 KB
  • sub-skills/mcp-and-automation/scripts/plan_benchmark_command.py7 KB
  • sub-skills/question-answering/SKILL.md3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.