Add LangChain docs agent example for AI Gateway#282
Merged
Conversation
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).
✅ Deploy Preview for redpanda-labs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
@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.
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.well-known/openid-configurationcloudv2-production.redpanda.cloud) and handles token refresh with a 30-second expiry bufferAgentMiddlewareand optional LangSmith tracingPreview Pages
Build a LangGraph Agent with the Redpanda AI Gateway
Test plan
poetry installandpoetry run redpanda-agentwith valid credentials in.env.local