docs(weather-agent): UI-first rewrite of advanced demo + LLM setup#466
Conversation
deploy_and_verify_advanced.sh exercises only the AuthBridge / MCP token-exchange path, so it can succeed while the Kagenti UI still returns "LLM execution failed: Connection error." or "No LLM API key configured." — both happen when the agent cannot reach the configured LLM. Restructure the LLM section into two explicit options (Ollama default vs. OpenAI) with the kubectl secret + env-patch recipe, note the duplicate-LLM_API_KEY behavior of the patch flow, and add troubleshooting rows tying each UI error message to its fix. Also flag in Prerequisites that the verify script does not exercise the LLM path. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughDocs now state that chat-style UI verification requires a configured LLM (Ollama or OpenAI), specify using a ChangesLLM Provider Setup Documentation
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@authbridge/demos/weather-agent/demo-ui-advanced.md`:
- Line 390: In the troubleshooting command in demo-ui-advanced.md where the
secret verification uses escaped pipes (`\| base64 -d \| wc -c`), remove the
backslashes so the shell pipes work when copied; update the string to use plain
pipes (`| base64 -d | wc -c`) in the table row that mentions `kubectl get secret
openai-secret -o jsonpath='{.data.apikey}' \| base64 -d \| wc -c` so the command
executes correctly when run, and run the markdown spellcheck/linting afterward.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: fc217751-4782-4a99-88ad-c15a958d183d
📒 Files selected for processing (1)
authbridge/demos/weather-agent/demo-ui-advanced.md
Address review feedback that the previous structure was too verbose and too kubectl-heavy for a "UI demo." Rewrite the file end-to-end so the primary flow runs in the Kagenti UI, mirroring the github-issue UI demo's pattern: - Open with a "How this differs from the standard demo" comparison table so users know up-front what changes vs. demo-ui.md. - Step 1: one Keycloak script invocation. - Step 2: import the tool via the UI with AuthBridge + SPIRE checked. - Step 3: import the agent via the UI; LLM env loaded via Import from URL using the existing beginner .env.openai / .env.ollama files, with one MCP_URL edit to point at the advanced tool. Outbound Routing Rules expander replaces the manual configmaps-advanced.yaml apply for backends that support it (kagenti#1194); fallback to kubectl apply called out as a one-liner. - Step 4: chat in the UI. - Step 5 (optional): deploy_and_verify_advanced.sh for CLI / CI users. Move the existing kubectl + manifest flow + AgentRuntime gotchas to a clearly-marked "Appendix: kubectl-only path" so users who prefer the manifest path still have it, without it dominating the doc. Mirror PR rossoctl#439's "keycloak-admin-secret is not in team1; operator 0.2+ keeps it in kagenti-system" phrasing in Prerequisites for consistency across the two weather demos. Keep the LLM troubleshooting rows from the previous commit. The underlying gap (deploy_and_verify_advanced.sh does not exercise the LLM path) still exists and remains the demo's most common surprise. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@authbridge/demos/weather-agent/demo-ui-advanced.md`:
- Around line 137-139: The fenced code block containing the MCP_URL environment
line is missing a language tag (triggers MD040); update the opening fence for
the block that contains "MCP_URL=http://weather-tool-advanced-mcp:8000/mcp" to
include a language identifier such as bash (e.g., change ``` to ```bash) so the
markdown linter recognizes the language.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ddba4ce9-5616-401e-a2e9-c92c7b836049
📒 Files selected for processing (1)
authbridge/demos/weather-agent/demo-ui-advanced.md
Round of fixes from a real run-through of the UI flow: - Step 2: button label is "Build & Deploy Tool" (not "Deploy Tool"); add explicit Target Port: 8000. - Step 2 / Step 3: prepend a callout that the tool/agent names MUST be the -advanced variants. Importing as plain weather-tool / weather-service silently breaks token exchange because the Service ends up as weather-tool-mcp instead of weather-tool-advanced-mcp, MCP_URL stops resolving, and the Keycloak audience scopes registered by Step 1 don't match the workload SPIFFE. - Step 3: reorder Outbound Routing Rules to come right after SPIRE, before Service Port — matches the actual import-form layout. Replace the labeled-column table with a positional 3-field list because the UI form fields are currently unlabeled. - Step 4: note that the Agent Catalog shows BOTH workloads (the advanced demo labels the tool kagenti.io/type=agent so AuthBridge gets injected; injectTools feature gate is off by default), and the Tool Catalog is empty. Without the note this looks broken. - Cleanup: also delete Shipwright Build + BuildRun. The Kagenti backend reconciliation service treats orphaned builds as "needs deployment" and re-creates the Deployment + Service + ServiceAccount within seconds, making it impossible to delete via kubectl alone. - Troubleshooting: add rows for the recreated-on-delete and wrong-MCP-URL symptoms above. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
pdettori
left a comment
There was a problem hiding this comment.
Clean docs PR — UI-first rewrite is well-structured, all 3 commits properly signed-off, CI green. CodeRabbit's earlier findings (escaped pipes, missing lang tag) are resolved in the final commit.
Address review nit on PR rossoctl#466: the env-var snippet inside the agent import step had a bare ``` opener; markdownlint MD040 wants a language tag. Tagging it `text` since it's a literal env var assignment, not a shell command. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
Summary
Restructure
authbridge/demos/weather-agent/demo-ui-advanced.mdas a UI-first walkthrough. The previous version was a kubectl-heavy procedure with the UI flow buried in "Step 4 (Optional)"; reviewers (and a real user run-through) found it too verbose for what is meant to be a UI demo.authbridge/demos/github-issue/demo-ui.md:.env.openai/.env.ollamafiles, with oneMCP_URLedit to retarget the advanced tool. Outbound Routing Rules expander replaces the manualconfigmaps-advanced.yamlapply for backends with kagenti#1194; the kubectl fallback is a single line for older builds.deploy_and_verify_advanced.shfor CLI / CI users.deploy_and_verify_advanced.shdoesn't exercise the LLM path, so the script can succeed while UI chat fails withConnection errororNo LLM API key configured) still exists and is the demo's most common surprise.Coordination with #439
#439 updates the standard demo's Installer-Provided Resources section to reflect that
keycloak-admin-secretlives inkagenti-system(operator 0.2+), notteam1. This PR mirrors that exact phrasing in the advanced demo's Prerequisites so both files stay consistent. Different files; no merge conflict.Test plan
.env.openaiimport +openai-secret.Error: LLM execution failed: Connection error.(Ollama not running) andError: No LLM API key configured.(emptyopenai-secret) and confirmed the new troubleshooting rows resolve them.spec.type: agent+ client-registration-label gotchas that were in the original doc.Assisted-Bytrailer on both commits; commit-msg hook passes.Assisted-By: Claude Code
Summary by CodeRabbit