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-demoIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
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.
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.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| kagent-doc2vec-demo (this skill)by charles-hsiao | 77 | 3 | 5mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 106.6k | 5d ago | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 106.0k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.3k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 67.6k | 3d ago | CLAUDE.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.
Skill content
View source on GitHubkagent 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
- Add
.md,.pdf, or.docxfiles torunbooks/orpost-mortems/ - Re-run
./build-vectors.shto regenerate the vector databases - Rebuild and push the Docker image
- 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 rootis used only during the image build to create/data; the final container user iskagent.- 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=openaiwith an Azure OpenAI or self-hosted endpoint.
Related Links
Related Skills
Agent-Reach
106.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
taste-skill
106.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
headroom
78.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
67.6kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
