Kubeflow Docs Agent
The official RAG-based documentation assistant for the Kubeflow website, with hybrid retrieval, streaming answers and structured citations.
- Source repo
- kubeflow/docs-agent
- Stars
- ★ 52
- Last updated
- 4d ago
- FARS reviewed
- Nov 08, 2026
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 56/100 · Major gaps
At a glance
- How it runs
- Works with
- Platform-specificOpenAI API (Partial support)
- Cost
- Free software; you pay for model usage
- Setup effort
- High · needs real infrastructure
- You'll need
- Typical use
- A Kubeflow platform operator answering a user's question about creating a pipeline, and needing the reply to cite official documentation.
- Not a fit if
- Solo developers without a Kubernetes cluster or GPU nodes
- Users who want something running locally within minutes
- Teams unwilling to operate Milvus, KServe and KFP themselves
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-28
- Source review
- 56/100 · Major gaps
What does this agent do, and when should you use it?
This is the official LLM implementation of the Kubeflow Documentation Assistant, a retrieval-augmented generation system that lets users search across Kubeflow documentation and receive contextual answers. Retrieval runs on Milvus: production uses RAG v4 hybrid search combining 768-dimensional MPNet dense vectors with native BM25 sparse vectors and a typed release_date field. Generation is served by KServe with a vLLM backend running RedHatAI/Llama-3.1-8B-Instruct, with auto tool choice and the llama3_json tool-call parser enabled. Ingestion is implemented as Kubeflow Pipelines that fetch the kubeflow/website content/en directory, parse and chunk it canonically, call the in-cluster TEI embeddings service, and write to Milvus in batches. Two APIs are provided: a WebSocket server in server/app.py and a FastAPI HTTPS server in server-https/app.py, both supporting streaming and non-streaming responses, tool calling and de-duplicated citation collection. The repository also ships an MCP server, kagent controller manifests, a Terraform platform stack and a gateway-guardrails Helm chart, targeting deployment on Kubernetes such as OKE.
The ingest side fetches .md and .html docs from GitHub (by default kubeflow/website under content/en), parses and re-chunks them in canonical_rag_ingest.py, extracts release_date, obtains 768-dimensional embeddings from the in-cluster TEI service, and batch-inserts dense plus native BM25 vectors into Milvus via pymilvus. At query time, docs-agent-mcp/mcp-server/server.py applies a deterministic intent router (SEARCH_MODE=auto) over Milvus v4 hybrid search, then passes the retrieved passages to the KServe llama3.1-8B endpoint, which produces answers plus structured citations — the README states the LLM never renders URLs. Clients reach it either through the WebSocket handler (handle_websocket, stream_llm_response) or the HTTPS endpoint POST /chat, which emits SSE events of type content, tool_result, citations and done for streaming, or JSON with response and citations otherwise; GET /health backs Kubernetes probes. Infrastructure is declared in docs-agent-mcp/terraform across namespaces.tf, knative.tf, kubeflow_pipelines.tf, milvus.tf, kagent.tf and gateway_guardrails.tf, while the gateway-guardrails chart supplies the Istio gateway with TLS, CORS lockdown, a 60 req/min token bucket and zero-trust AuthorizationPolicies. CI runs through oke-cicd.yaml and tests.yml.
- A Kubeflow platform operator answering a user's question about creating a pipeline, and needing the reply to cite official documentation.
- A docs maintainer re-running the KFP ingestion pipeline after a website release to refresh the Milvus collection without rebuilding the stack.
- A platform team deploying an internal-only documentation Q&A service on its own Kubernetes or OKE cluster and reproducing it through Terraform.
- A frontend engineer embedding the assistant into the Kubeflow website by calling POST /chat and consuming the SSE events plus the citations field.
- An agent developer wanting to reuse the same retrieval and citation logic through an MCP client instead of reimplementing chunking and vector search.
- A security reviewer needing the public chat endpoint to ship with TLS, a CORS allowlist and rate limits straight from the gateway-guardrails defaults.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Environment variables
HF_TOKENKSERVE_URLMILVUS_HOSTMILVUS_PORTEMBEDDING_MODEL- Config files
response.json
How do you install or deploy this agent?
Prerequisites: Kubernetes 1.20+, Helm 3.x, Kubeflow Pipelines, GPU nodes for LLM inference, and an SSL certificate from a trusted CA (browsers block WebSocket and HTTPS connections without one).
Install Milvus into the docs-agent namespace first:
helm repo add milvus https://milvus-io.github.io/milvus-helm/
helm repo updatehelm upgrade --install my-release zilliztech/milvus -n docs-agent \
--set cluster.enabled=false \
--set standalone.enabled=true \
--set etcd.replicaCount=1 \
--set etcd.persistence.enabled=false \
--set minio.mode=standalone \
--set minio.replicas=1 \
--set pulsar.enabled=false \
--set pulsarv3.enabled=false \
--set standalone.podAnnotations."sidecar\.istio\.io/inject"="false"Verify the connection:
from pymilvus import connections
connections.connect("default", host="my-release-milvus.docs-agent.svc.cluster.local", port="19530")
print("Connected to Milvus successfully!")Then apply the KServe ServingRuntime and InferenceService (model RedHatAI/Llama-3.1-8B-Instruct, vLLM backend, HF_TOKEN from huggingface-secret):
apiVersion: serving.kserve.io/v1alpha1
kind: ServingRuntime
metadata:
name: llm-runtime
namespace: docs-agent
spec:
supportedModelFormats:
- name: huggingface
version: "1"
autoSelect: true
containers:
- name: kserve-container
image: kserve/huggingfaceserver:latest-gpu
command: ["python", "-m", "huggingfaceserver"]
resources:
requests:
cpu: "4"
memory: "16Gi"
nvidia.com/gpu: "1"
limits:
cpu: "6"
memory: "24Gi"
nvidia.com/gpu: "1"If Kubeflow Pipelines must reach Milvus, add the RBAC grants:
kubectl create role milvus-access \
--namespace docs-agent \
--verb=get,list,watch \
--resource=services,endpoints
kubectl create rolebinding kfp-to-milvus-editor \
--namespace docs-agent \
--role=milvus-access \
--serviceaccount=kubeflow:default-editorThe wider platform (Knative, Istio, KServe, KFP, Milvus, kagent, gateway guardrails) is provisioned declaratively from docs-agent-mcp/terraform; exact variable names and credential wiring are not enumerated in the README and must be filled in from variables.tf and kagent.tf.
How do you use this agent?
Run the ingestion pipeline to load documentation into Milvus:
python docs-agent-mcp/pipelines/kubeflow-pipeline.pyStart one of the two API servers:
# WebSocket API
python server/app.py
# HTTPS API
python server-https/app.pyStreaming request (Server-Sent Events):
curl -X POST "https://your-domain.com/chat" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{"message": "What is KServe?", "stream": true}'Non-streaming request:
curl -X POST "https://your-domain.com/chat" \
-H "Content-Type: application/json" \
-d '{"message": "What is KServe?", "stream": false}'import requests
import json
response = requests.post(
'https://your-domain.com/chat',
json={
'message': 'What is KServe?',
'stream': False
}
)
data = response.json()
print(f"Response: {data['response']}")
if data.get('citations'):
print(f"Sources: {data['citations']}")Key environment variables: KSERVE_URL, MODEL (default llama3.1-8B), PORT (default 8000), MILVUS_HOST, MILVUS_PORT (default 19530), MILVUS_COLLECTION (default kubeflow_docs), EMBEDDING_MODEL (default sentence-transformers/all-mpnet-base-v2). Pipeline parameters include repo_owner, repo_name, directory_path (default content/en), chunk_size (1000), chunk_overlap (100), base_url and milvus_host. For debugging:
kubectl get pods -n docs-agent | grep milvus
kubectl get inferenceservice -n docs-agent
kubectl logs -f deployment/docs-assistant-apiSafety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Explicit retrieval design: RAG v4 combines 768-d MPNet dense vectors with native BM25 and a typed release_date field for hybrid search.
- Citation discipline: a deterministic MCP intent router produces structured citations, and the README states the LLM never renders URLs, limiting link hallucination.
- Two documented interfaces: a WebSocket server and a FastAPI HTTPS API expose SSE streaming, non-streaming JSON and a /health probe from the same backend.
- Reproducible infrastructure: docs-agent-mcp/terraform declares namespaces, Knative, Milvus, KFP, kagent and gateway guardrails, and schedules Milvus on CPU nodes to keep GPUs for inference.
- Deliberate pipeline tradeoffs: Feast was removed, vectors go straight into Milvus via pymilvus, and chunking calls the in-cluster TEI service so Dockerfile.pipeline stays a plain python:3.11-slim image.
- Edge security defaults ship in the box: the gateway-guardrails chart provides TLS, CORS lockdown, a 60 req/min token bucket and zero-trust AuthorizationPolicies.
- High entry cost: Kubernetes 1.20+, Helm 3.x, Kubeflow Pipelines, GPU nodes and a trusted-CA SSL certificate are all required, and browsers block connections without the certificate.
- Tight coupling to the Kubeflow stack — Milvus for retrieval, KServe plus vLLM for inference, KFP for ingestion — so swapping any layer means editing configuration or code.
- Model pinning: the InferenceService hardcodes RedHatAI/Llama-3.1-8B-Instruct, the llama3_json tool-call parser and an HF_TOKEN requirement.
- Default corpus is only kubeflow/website content/en; ingesting other repositories requires changing repo_owner, repo_name, directory_path and related parameters.
- Terraform internals are only summarized: the README lists each .tf file's role but not the concrete variable values or credential wiring.
- Operational burden sits with the adopter: RBAC grants, GPU memory tuning (0.90 utilization), slow-query monitoring and browser-local chat history limits.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Kubeflow Docs Agent This agent | 56 · Major gaps | Self-hosted serviceFree + model costs | ★ 52 | 4d ago | Python | — |
| fazer.ai Agents | 67 · Some gaps | — | ★ 145 | 1d ago | TypeScript | OpenAI API · Claude API |
| Heym | 63 · Some gaps | Self-hosted serviceFree + model costs | ★ 2k | 1d ago | Python | Codex · Claude.ai |
| Google Cloud Agent Starter Pack | 55 · Major gaps | CLIFree + model costs | ★ 6.6k | 17d ago | — | — |
How does FollowAgents rate this agent?
Why each dimension lost points
CI explicitly limits permissions to reading source and writing packages and says the build workflow does not deploy to the cluster. Gateway documentation describes TLS, CORS, and rate limits, supporting least privilege and external-effect controls. The session issuer mints anonymous short-lived tokens and loads or generates a private key at import, but the packet does not explain issuance throttling or key rotation; retrieval needs no user confirmation. The README describes local chat history, citations, and data flow, while the shown legacy API still permits wildcard CORS and reduces Milvus failures to empty results. Attribution includes documentation citations and contribution guidance, but publisher identity is unverified.
The README includes legacy APIs alongside the current MCP architecture and contains differing hostnames, collection names, and deployment instructions, weakening self-consistency. The CI workflow specifies dependency installation, compilation, linting, Helm rendering, and unit tests, but runtime availability depends on Kubernetes, Milvus, KServe, model hosting, and cloud resources; legacy code catches search exceptions and returns empty results, hiding failures from callers. This assessment does not claim those checks were executed.
The product targets Kubeflow documentation questions and describes retrieval, streaming chat, citations, and multiple deployment scenarios; the legacy system prompt defines routing for general, Kubeflow-specific, and out-of-scope questions. The current README describes deterministic MCP intent routing, but the sample code does not fully match that implementation, so boundaries and trigger behavior are only partly verifiable. Installation guidance fits Kubernetes/Kubeflow environments, while GPU, cluster, TLS, and hosted-infrastructure requirements limit environmental fit.
The README provides a contents list, architecture, installation, configuration, usage, troubleshooting, and contribution guidance with examples. However, historical API steps appear alongside current MCP/Terraform deployment, and terminology, collection names, and default addresses diverge. The license text is complete, and CI supports commit-SHA and SemVer image tags; a clear maintenance owner and release history are not shown. The README mentions local chat history and future enhancements, but gives limited detail on answer limitations and operational boundaries.
Retrieval augmentation, structured citations, and streaming directly support documentation Q&A. However, the legacy sample can turn failed retrieval into an empty-results response, and the supplied sample does not fully corroborate the README's current capabilities. Deployment requires a vector database, inference service, GPU, and Kubernetes, making infrastructure and maintenance costly; the static evidence does not establish realized benefits relative to that cost.
The README maps architecture components to source paths, the workflow describes intended checks, and the legacy API shows retrieval, citations, and error handling, providing some traceability and cross-file support. The README's production architecture does not fully match the legacy API sample, and performance, accuracy, and production-readiness claims lack outcome evidence in the supplied material; facts, design intent, and inferred effects are not consistently distinguished.
- The packet mixes the current MCP architecture with legacy API implementations; verify the active entry points, defaults, and citation behavior before deployment or evaluation.
- The anonymous session-token service and retrieval API handle network traffic; review the legacy API's wildcard CORS and silent search failures before adoption.
- The CI file describes checks, but this is a static review and does not establish that checks passed or that production behavior is sound.
FAQ
How much infrastructure does it need to run?
Is the software itself paid?
Can I swap in a different model?
Why do answers come with citations?
What usually breaks during ingestion?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.