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
- ★ 46
- Last updated
- 1d ago
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 42/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
- Source review
- 42/100 · Major gaps 1 safety controls not found
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.
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-apiWhat 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 | 42 · Major gaps | Self-hosted serviceFree + model costs | ★ 46 | 1d ago | Python | — |
| Heym | 46 · Major gaps | Self-hosted serviceFree + model costs | ★ 1.2k | today | Python | Codex · Claude.ai |
| Google Cloud Agent Starter Pack | 67 · Some gaps | CLIFree + model costs | ★ 6.6k | 5mo ago | Python | — |
| OpenContracts Document Intelligence Platform | 51 · Major gaps | Self-hosted serviceFree + model costs | ★ 1.5k | 1d ago | Python | Claude Code · Claude.ai |
How does FollowAgents rate this agent?
Why each dimension lost points
The README describes gateway-guardrails rate limiting, CORS lockdown, and zero-trust AuthorizationPolicies, plus an RBAC example for KFP-to-Milvus access, so least privilege is at least designed; however, the actual policy files are not shown, KServe uses a latest-gpu image, and HF_TOKEN is injected via secretKeyRef, leaving sensitive-data handling at the description level. least_privilege and sensitive_data_handling score 1. User confirmation scores 0 because the chat endpoint executes tool calls and streams output with no confirmation or approval step. Data-flow transparency scores 1: architecture diagrams and RAG v4 notes exist, but end-to-end retention and logging policies are absent. Dependency security scores 1: CI pins ruff and Helm versions, yet container images use latest-gpu and no dependency vulnerability scanning is visible. External effects score 1: CI explicitly avoids cluster access and deployment is delegated to Argo CD, but the Agent itself calls external models and vector stores without a full impact statement. Rollback scores 1: CI mentions changing an image tag and syncing Argo CD, but no concrete rollback procedure or version-retention policy is provided. Source attribution scores 2: the README names the author, KEP-867, mentors, and organizations, and states that citations are structured and the LLM never renders URLs.
Self-consistency scores 1: the README describes both legacy FastAPI servers and the newer MCP architecture, and the installation section still points to server/app.py and server-https/app.py, which may conflict with the legacy/ layout. Dependency availability scores 1: CI installs MCP and pipeline dependencies separately and compiles them, but not all versions are pinned and the KServe image uses latest-gpu, creating drift risk. Failure messages score 1: the README lists common issues and debug commands, but the code-level error handling and error codes are not documented.
Audience and scenarios score 2: the README clearly targets Kubeflow users and website chatbot integration via WebSocket and HTTPS. Capability boundaries score 1: RAG v4, hybrid retrieval, and intent routing are mentioned, but unsupported question types and model limits are not systematically listed. Trigger precision scores 1: MCP intent routing and SEARCH_MODE=auto are described, but trigger conditions, thresholds, and misfire handling are missing. Environment fit scores 1: the project depends on Kubernetes, GPUs, Helm, Terraform, and OKE, with no local or alternative-environment path documented.
Information architecture scores 2: the README has a table of contents, repository layout table, architecture diagrams, and configuration tables. Install notes score 2: Milvus, KServe, KFP, and API server steps are provided, though some paths point to legacy code. Naming stability scores 1: legacy/ and docs-agent-mcp/ coexist, and the CI variable ENABLE_OKE_DEPLOY conflicts with its own comment. Examples and FAQ score 2: WebSocket, curl, JavaScript, and Python examples plus troubleshooting are present. Known limitations score 1: only future improvements and chat-history limits are mentioned, without a systematic limitations list. License scores 3: the full Apache-2.0 text is present and the README declares Apache-2.0. Versioning and changelog score 1: CI supports SemVer image tags, but no CHANGELOG or release notes are in the repository. Maintenance responsibility scores 1: the README lists an author and mentors, but issue handling, maintainer rotation, and security contact are absent, and the publisher identity is unverified.
Output usability scores 2: the API returns structured JSON and SSE events with citations, which is integration-friendly. Marginal value scores 1: the project addresses Kubeflow documentation retrieval, but many similar RAG documentation assistants exist and the repository contains legacy and multiple implementations, diluting incremental value. Cost-benefit scores 1: it requires GPU nodes, Milvus, KServe, and KFP, with no resource-cost estimate or lightweight alternative documented.
Claim traceability scores 1: the README cites KEP-867, RAG_V4_ARCHITECTURE.md, and specific file paths, but provides no evaluation data or reproducible verification steps. Cross-source corroboration scores 1: CI workflows and Helm test templates partially corroborate build and connectivity checks, but core RAG quality and security policies lack multi-source validation. Fact-inference separation scores 1: the README mixes design goals with implemented features and does not clearly distinguish verified from planned capabilities.
- Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- The README describes both legacy FastAPI servers and the newer MCP architecture, and the installation section still points to server/app.py and server-https/app.py; confirm which implementation is the supported path before deployment.
- KServe uses floating image tags such as kserve/huggingfaceserver:latest-gpu, creating reproducibility and supply-chain drift risk; pin image digests for production use.
- The chat endpoint executes tool calls and streams output without any user confirmation or approval mechanism; add confirmation and permission boundaries if sensitive or write-capable tools are connected.
- No CHANGELOG, release notes, or security contact are present, and the publisher identity is unverified, leaving maintenance responsibility and update paths unclear.
- The project depends on heavy infrastructure including GPUs, Milvus, KServe, and KFP, with no resource-cost estimate or lightweight alternative documented.