Skip to content

Correct rpk ai usage across AI Gateway and MCP pages#12

Merged
micheleRP merged 8 commits intomainfrom
rpk-ai-doc-corrections
May 5, 2026
Merged

Correct rpk ai usage across AI Gateway and MCP pages#12
micheleRP merged 8 commits intomainfrom
rpk-ai-doc-corrections

Conversation

@micheleRP
Copy link
Copy Markdown
Contributor

@micheleRP micheleRP commented May 5, 2026

Summary

Updates ADP docs to match what rpk shipped in PRs #30273, #30327, and #30360. The pages were written ahead of the rpk-side merge and made several claims that don't match the actual command surface — most importantly that rpk ai owns auth and profile subtrees (it doesn't: in plugin mode both subtrees are suppressed by design, and auth is owned by rpk cloud login).

  • Drop "rpk ai plugin" framing; treat rpk ai as a first-class command (mirrors how we describe rpk connect).
  • Replace rpk ai auth login / rpk ai auth token / rpk ai profile create|use with the actual flow (rpk cloud login + rpk profile use / rpk cloud cluster use); the AI Gateway URL is cached on the rpk cloud profile per #30327.
  • Fix install command: rpk plugin install airpk ai install.
  • New "Environment variables" subsection on connect-agent.adoc documenting RPAI_TOKEN, RPAI_ENDPOINT, --rpai-endpoint, and the plugin-mode flag rename.
  • SDK examples now use OIDC client-credentials only — rpk ai is the data-access tool, not a token source for application code.
  • Fix OAuth provider CLI example with verified flags (--auth-endpoint, --token-endpoint, --display-name); drop the nonexistent --auth-config row from MCP create.
  • Add TODO(rpk-ai) markers for follow-ups (alias removal, auth/profile-suppression behavior, --auth-config flag if it lands later).

Source-verified against cloudv2/apps/rpai/internal/cmd on 2026-05-05.

Preview pages

Test plan

  • npm run build passes locally (no new warnings introduced)
  • Visually verify the rendered pages on Netlify preview:
    • AI Gateway → Connect your agent (biggest rewrite — install, auth, environment variables, SDK examples)
    • AI Gateway → Overview (one-line "Managed authentication" fix)
    • MCP → Test a server's tools (CLI trailer)
    • MCP → Create an MCP Server (--auth-config row removed; CLI trailer)
    • MCP → Configure an OAuth Provider (full CLI example rewritten)
  • After the next rpk release ships these PRs: run gen-rpk and confirm the auto-generated /reference/rpk/rpk-ai/ pages land; update the xref pointers from these ADP pages.
  • Sanity-check grep -rn \"TODO(rpk-ai)\" modules/ matches the planned set (3 markers).

🤖 Generated with Claude Code

Updates ADP docs to match what rpk shipped in PRs #30273, #30327, and
#30360. The pages were written ahead of the rpk-side merge and made
several claims that don't match the actual command surface — most
importantly that rpk ai owns auth and profile subtrees (it doesn't; in
plugin mode both subtrees are suppressed and auth is owned by
rpk cloud login).

- Drop "rpk ai plugin" framing; treat rpk ai as a first-class command
- Replace rpk ai auth/profile content with rpk cloud login + rpk profile use
- Fix install command: rpk plugin install ai -> rpk ai install
- Add Environment variables subsection on connect-agent (RPAI_TOKEN,
  RPAI_ENDPOINT, --rpai-endpoint, plugin-mode flag rename)
- SDK examples now use OIDC client-credentials only; rpk ai is the
  data-access tool, not a token source for application code
- Fix OAuth provider CLI example with verified flags (--auth-endpoint,
  --token-endpoint, --display-name); drop nonexistent --auth-config
  flag from MCP create
- Add TODO(rpk-ai) markers for future verification (alias removal,
  auth/profile suppression, --auth-config future flag)

Verified against cloudv2/apps/rpai/internal/cmd source on 2026-05-05.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@micheleRP micheleRP requested a review from a team as a code owner May 5, 2026 20:25
@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for redpanda-agentic-data-plane ready!

Name Link
🔨 Latest commit 63fb644
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-agentic-data-plane/deploys/69fa603c7a69000008e36032
😎 Deploy Preview https://deploy-preview-12--redpanda-agentic-data-plane.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread modules/ai-gateway/pages/connect-agent.adoc Outdated
Comment thread modules/ai-gateway/pages/connect-agent.adoc Outdated
Comment thread modules/ai-gateway/pages/connect-agent.adoc Outdated
micheleRP and others added 6 commits May 5, 2026 14:49
Style review caught a few items that needed fixing across the same set
of pages.

Newly introduced (fixed):
- Reword 7 sentences that started with the inline code `rpk ai`. Style
  guide forbids starting sentences with code; moved the command
  mid-sentence (e.g. "The `rpk ai` command honors..." or "Use `rpk ai`
  for...").

Pre-existing (also fixed since the pages were already in the diff):
- connect-agent.adoc: "You'll construct" -> "You construct" (present
  tense per style guide).
- connect-agent.adoc: drop bold from leading phrases in "Best practices"
  bullets; bold is for UI elements, not emphasis.
- overview.adoc: "via Google AI Studio" -> "through Google AI Studio"
  (terminology list bans `via`).
- create-server.adoc: rewrite "There is no hand-written form code per
  type" as "No per-type hand-written form code is required" (style
  guide bans "There is/are" constructions).
- oauth-providers.adoc: NOTE wording "should be able to bind" -> "need
  to bind" (terminology list bans `should`).
- oauth-providers.adoc: shorten verbose H2 ("Manage external identity
  providers for user-delegated MCP authentication" -> "Browse OAuth
  providers") + add a clearer lead-in before the columns table.
- oauth-providers.adoc: remove trailing whitespace.
- test-tools.adoc: future tense "it will work" -> "it works".
- All 5 files: add module prefixes (`mcp:`, `ai-gateway:`) to bare
  same-module xrefs per Antora conventions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Configure the managed flow section listed 5 deep-dive pages but the
catalog has grown to 9 (Zendesk, Workday, Ironclad, and Ramp also have
deep-dives now). Rather than duplicate the list, point readers at the
catalog page, which is already organised by category and includes the
deep-dive links inline next to each type's description.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Local build was emitting 16 xref-resolution errors across 6 pages plus
one partial. None were caused by recent commits; they were stale
references left over from the `cloud-docs:ai-agents` -> `redpanda-adp`
component migration plus a few cross-component xrefs that lost their
component prefix.

Local-component fixes:
- ai-agents:observability/concepts.adoc -> observability:concepts.adoc
  (transcripts.adoc, ingest-custom-traces.adoc, partial)
- ai-agents:observability/transcripts.adoc -> observability:transcripts.adoc
- ai-agents:agents/monitor-agents.adoc -> agents:monitor.adoc
- governance:guardrails.adoc -> governance:guardrails/index.adoc (the
  page moved into a subdirectory)
- integrations/index.adoc -> integrations:index.adoc (was bare; needed
  the same-component module prefix)
- agent-trace-hierarchy / mcp-server-trace-hierarchy anchors renamed
  to ...-transcript-hierarchy to match the actual section headings on
  observability/concepts.adoc; link labels updated accordingly.

Cross-component fixes (verified the targets exist):
- manage:rpk/rpk-install.adoc -> redpanda-cloud:manage:rpk/rpk-install.adoc
- develop:connect/components/inputs/otlp_*.adoc ->
  redpanda-connect:components:inputs/otlp_*.adoc

Build verification: `npm run build` now reports 0 xref errors. The
remaining warnings are pre-existing template-attribute placeholders
(unrelated).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@micheleRP micheleRP merged commit fe71a7e into main May 5, 2026
4 checks passed
@micheleRP micheleRP deleted the rpk-ai-doc-corrections branch May 5, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant