SkillAgentSearch skills...

kagent-doc2vec-demo

A demo project showing how to use doc2vec to vectorize internal runbooks and incident post-mortems, then expose them to a kagent AI agent via an MCP server

Install / Use

claude mcp add charles-hsiao -- npx -y github:charles-hsiao/kagent-doc2vec-demo

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

77/100

Supported Platforms

Claude Code
Claude Desktop

Tags

Our assessment of kagent-doc2vec-demo

kagent-doc2vec-demo scores 77/100 on our quality scale, 3688th of 4,658 Development & Engineering skills we index.

Its MCP Server is 6.3 KB long, well organised into 39 sections with 13 code examples: a thorough specification that gives an agent plenty to work with.

It has 3 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
29/30
Structure
20/20
Description
15/15
Adoption
3/20
Freshness
11/15

Maintenance, license and trust

  • The repository was last updated about 5 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 78/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

kagent-doc2vec-demo compared with similar skills

All 4 of these similar skills score higher than kagent-doc2vec-demo; compare them before choosing.

SkillScoreStarsUpdatedFormat
kagent-doc2vec-demo (this skill)by charles-hsiao7735mo agoMCP Server
Agent-Reachby Panniantong100106.6k5d agoCLAUDE.md
taste-skillby Leonxlnx100106.0ktodayCLAUDE.md
headroomby headroomlabs-ai10078.3ktodayCLAUDE.md
ai-job-searchby ai-job-search-dev10067.6k3d agoCLAUDE.md

Frequently asked questions

How do I install kagent-doc2vec-demo?
Run claude mcp add charles-hsiao -- npx -y github:charles-hsiao/kagent-doc2vec-demo. The install tabs above show the steps for each supported agent.
Which AI agents does kagent-doc2vec-demo work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is kagent-doc2vec-demo safe to use?
It declares no license and scores 78/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is kagent-doc2vec-demo still maintained?
The repository was last updated about 5 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.

kagent doc2vec Demo — Cloud-Native Knowledge Base

A demo project showing how to use doc2vec to vectorize internal runbooks and incident post-mortems, then expose them to a kagent AI agent via an MCP server — so engineers can query operational knowledge in natural language.

How It Works

runbooks/ + post-mortems/
        │
        ▼  npx doc2vec config.yaml
  ops-runbooks.db
  incident-postmortems.db
        │
        ▼  docker build + push
  MCP Server image (ghcr.io base + embedded .db files)
        │
        ▼  kubectl apply -f k8s/
  Kubernetes: Deployment + Service
             RemoteMCPServer (kagent CRD)
             Agent (ops-sre-agent)
        │
        ▼  kagent UI / API
  "How was the PostgreSQL connection exhaustion handled last time?"

Project Structure

.
├── .env.example                         # Environment variable template
├── config.yaml                          # doc2vec source configuration
├── build-vectors.sh                     # Script: vectorize docs → .db files
├── Dockerfile                           # MCP server image with embedded .db files
├── runbooks/
│   ├── database/postgres-connection.md  # PostgreSQL connection troubleshooting
│   ├── kubernetes/pod-crashloopbackoff.md
│   └── oncall/onboarding-sre.md        # New on-call engineer guide
├── post-mortems/
│   ├── incident-2024-09-12-postgres-pool.md   # SEV-2: connection pool exhaustion
│   └── incident-2024-11-03-oom-kill.md        # SEV-1: OOMKilled cascade failure
└── k8s/
    ├── mcp-deployment.yaml   # Secret + ConfigMap + Deployment + Service
    ├── toolserver.yaml       # kagent RemoteMCPServer CRD
    └── agent.yaml            # kagent Agent CRD (ops-sre-agent)

Prerequisites

  • Node.js 18+
  • OpenAI API key
  • Docker (for building the MCP server image)
  • A Kubernetes cluster with kagent installed

Quick Start

Step 1 — Vectorize documents

cp .env.example .env
# Edit .env and set OPENAI_API_KEY=sk-...

./build-vectors.sh
# Produces: ops-runbooks.db, incident-postmortems.db

Step 2 — Build and push the MCP server image

docker build -t <your-registry>/ops-mcp-server:latest .
docker push <your-registry>/ops-mcp-server:latest

Local development with kind? See Using a local kind cluster below to skip the registry push.

Step 3 — Deploy to Kubernetes

# Edit k8s/mcp-deployment.yaml:
#   - Replace <your_openai_api_key> in the Secret
#   - Replace <your-registry> in the Deployment image field

kubectl apply -f k8s/

Step 4 — Query the agent

Open the kagent UI, find the ops-sre-agent, and ask questions such as:

  • PostgreSQL connection timeout alert — how did we handle it last time?
  • What should a new on-call engineer read first?
  • How do I troubleshoot a CrashLoopBackOff pod?

Using a local kind cluster

If you don't have a remote registry, you can run the entire stack locally with kind (Kubernetes in Docker).

Prerequisites

  • kind — brew install kind
  • kubectl — brew install kubectl
  • kagent CLI — for installing kagent into the cluster

Step A — Create a kind cluster

kind create cluster --name kagent-doc2vec-demo
# Verify the cluster is ready
kubectl cluster-info --context kind-kagent-doc2vec-demo

Step B — Install kagent

# Follow the official kagent install guide, targeting your kind cluster
# https://kagent.dev/docs/kagent/introduction/installation
kagent install --context kind-kagent-doc2vec-demo

Step C — Vectorize documents

cp .env.example .env
# Edit .env and set OPENAI_API_KEY=sk-...
./build-vectors.sh

Step D — Build the image locally

# No registry needed — build with a local tag
docker build -t ops-mcp-server:local .

Step E — Load the image into kind

# This makes the image available inside the kind cluster without a registry push
kind load docker-image ops-mcp-server:local --name kagent-doc2vec-demo

Step F — Deploy to the kind cluster

# Patch the image reference to the local tag before applying
# In k8s/mcp-deployment.yaml set:
#   image: ops-mcp-server:local
#   imagePullPolicy: Never        ← prevents Kubernetes from trying to pull from a registry
#
# Also replace <your_openai_api_key> in the Secret field

kubectl apply -f k8s/ --context kind-kagent-doc2vec-demo

Updating the image after changes

docker build -t ops-mcp-server:local .
kind load docker-image ops-mcp-server:local --name kagent-doc2vec-demo
kubectl rollout restart deployment/mcp-sqlite-vec -n kagent --context kind-kagent-doc2vec-demo

Tearing down

kind delete cluster --name kagent-doc2vec-demo

Adding Your Own Documents

  1. Add .md, .pdf, or .docx files to runbooks/ or post-mortems/
  2. Re-run ./build-vectors.sh to regenerate the vector databases
  3. Rebuild and push the Docker image
  4. Roll out the updated deployment: kubectl rollout restart deployment/mcp-sqlite-vec -n kagent

Configuration Reference

| File | Purpose | |------|---------| | config.yaml | Defines doc2vec sources (paths, file types, output DB paths) | | .env | OPENAI_API_KEY and optional embedding provider settings | | k8s/mcp-deployment.yaml | Kubernetes resources for the MCP server | | k8s/toolserver.yaml | Registers the MCP server as a kagent tool server | | k8s/agent.yaml | Defines the agent and its system prompt |

Security Notes

  • The Docker image runs as a non-root user (kagent) at runtime.
  • USER root is used only during the image build to create /data; the final container user is kagent.
  • The raw document content never leaves your environment — only embedding vectors are sent to the OpenAI API.
  • For air-gapped or stricter environments, replace EMBEDDING_PROVIDER=openai with an Azure OpenAI or self-hosted endpoint.

Related Links

Related Skills

View on GitHub
GitHub Stars3
CategoryDevelopment
Updated5mo ago
Forks2

Languages

Shell

Trust signals

78/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium1 low1 info