Skip to content

Add LangChain docs agent example for AI Gateway#282

Merged
micheleRP merged 5 commits intomainfrom
add-langchain-docs-agent
Mar 6, 2026
Merged

Add LangChain docs agent example for AI Gateway#282
micheleRP merged 5 commits intomainfrom
add-langchain-docs-agent

Conversation

@c4milo
Copy link
Copy Markdown
Contributor

@c4milo c4milo commented Mar 6, 2026

Summary

  • Adds a new ai-agents module to Redpanda Labs with the first lab: a LangGraph ReAct agent that connects to the Redpanda AI Gateway
  • Demonstrates unified LLM access, OIDC authentication, and dynamic MCP tool discovery through the gateway
  • Source code from https://github.com/c4milo/langchain-demo, with documentation converted to AsciiDoc following Redpanda Labs conventions
  • Adds a LangGraph ReAct agent example that connects to the Redpanda AI Gateway for unified LLM access and MCP tool calling
  • Implements OIDC authentication against the Redpanda Cloud identity provider with automatic discovery of the token endpoint via .well-known/openid-configuration
  • Configures the accepted audience (cloudv2-production.redpanda.cloud) and handles token refresh with a 30-second expiry buffer
  • Includes dynamic MCP tool discovery via AgentMiddleware and optional LangSmith tracing

Preview Pages

Build a LangGraph Agent with the Redpanda AI Gateway

Test plan

  • Run poetry install and poetry run redpanda-agent with valid credentials in .env.local
  • Verify OIDC discovery resolves the token endpoint automatically
  • Verify token refresh works across long-running sessions
  • Confirm MCP tool discovery and execution via the gateway

c4milo added 2 commits March 5, 2026 16:29
A LangGraph ReAct agent that connects to the Redpanda AI Gateway for
unified LLM access and MCP tool calling. Includes OIDC client_credentials
auth with configurable audience, dynamic tool discovery via gateway MCP,
and optional LangSmith tracing.
Resolve the token endpoint from the Redpanda Cloud OIDC discovery
document instead of hardcoding it. Replace REDPANDA_TOKEN_ENDPOINT
with REDPANDA_ISSUER and configure the accepted audience
(cloudv2-production.redpanda.cloud).
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 6, 2026

Deploy Preview for redpanda-labs-preview ready!

Name Link
🔨 Latest commit 71567f4
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-labs-preview/deploys/69ab3a197ee26400089f094f
😎 Deploy Preview https://deploy-preview-282--redpanda-labs-preview.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.

@c4milo
Copy link
Copy Markdown
Contributor Author

c4milo commented Mar 6, 2026

@micheleRP, I'm going to try to merge this PR into yours.

Move lab from ai/examples/ to ai-agents/langchain-agent/ to match the
repo structure from PR #281. Replace README.md with the AsciiDoc version
and add the docs page. Apply OIDC improvements: automatic token endpoint
discovery via .well-known/openid-configuration, configurable audience,
and .env.local convention.
@c4milo c4milo mentioned this pull request Mar 6, 2026
4 tasks
Strengthen learning objectives with skill-level verbs, use imperative
opening paragraph, rename section, add language tag to URL code block,
fix Next steps link, and improve wording throughout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@micheleRP micheleRP self-requested a review March 6, 2026 20:07
The "Increase AIO limit" step had `if` and `run` defined twice,
causing a workflow file parse error. Split into two separate steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@micheleRP micheleRP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@micheleRP micheleRP merged commit e0001f1 into main Mar 6, 2026
6 checks passed
@micheleRP micheleRP deleted the add-langchain-docs-agent branch March 6, 2026 20:51
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.

2 participants