Skip to content

Add LangGraph agent lab for AI Gateway#281

Closed
micheleRP wants to merge 4 commits intomainfrom
add-langchain-agent-lab
Closed

Add LangGraph agent lab for AI Gateway#281
micheleRP wants to merge 4 commits intomainfrom
add-langchain-agent-lab

Conversation

@micheleRP
Copy link
Copy Markdown
Contributor

@micheleRP micheleRP commented Mar 5, 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

Preview Pages

Build a LangGraph Agent with the Redpanda AI Gateway

Structure

ai-agents/
└── langchain-agent/
    ├── .env.example
    ├── pyproject.toml
    ├── README.adoc          ← Lab doc (symlinked into Antora)
    └── src/agent/           ← Python source
docs/modules/ai-agents/
└── pages/
    └── langchain-agent.adoc → symlink to README.adoc

Notes

  • The Next steps link renders only on the docs site (gated by ifdef::env-site[]).

Test plan

  • Verify README.adoc renders correctly on GitHub
  • Verify symlink resolves in a local Antora build (npm run build)
  • Verify poetry install && poetry run redpanda-agent runs with valid credentials
  • Verify Netlify deploy preview renders the lab page

🤖 Generated with Claude Code

micheleRP and others added 2 commits March 5, 2026 14:28
Add a new ai-agents module with a LangGraph ReAct agent lab that
demonstrates connecting to the Redpanda AI Gateway for unified LLM
access and MCP tool calling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace xref to ai-gateway.adoc (not available in labs build) with
a direct URL to the published docs page.

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

netlify Bot commented Mar 5, 2026

Deploy Preview for redpanda-labs-preview ready!

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

micheleRP and others added 2 commits March 5, 2026 16:30
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c4milo added a commit that referenced this pull request Mar 6, 2026
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
Copy link
Copy Markdown
Contributor

c4milo commented Mar 6, 2026

Closing in favor of #282, which consolidates this PR's structure (directory layout, AsciiDoc README, docs page) with additional improvements:

  • OIDC discovery: token endpoint is now resolved automatically from the .well-known/openid-configuration document instead of being hardcoded
  • Configurable audience (cloudv2-production.redpanda.cloud) for the token request
  • .env.local convention for local credentials

All of your work is preserved in #282. Thanks @micheleRP!

@c4milo c4milo closed this Mar 6, 2026
@c4milo c4milo reopened this Mar 6, 2026
@c4milo
Copy link
Copy Markdown
Contributor

c4milo commented Mar 6, 2026

@micheleRP, dumb claude closed the wrong PR! gah, I will just go with its flow.

@c4milo c4milo closed this Mar 6, 2026
micheleRP added a commit that referenced this pull request Mar 6, 2026
* feat: add LangChain docs agent example for Redpanda AI Gateway

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.

* feat: use OIDC discovery for token endpoint resolution

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).

* refactor: consolidate with PR #281 structure and add OIDC discovery

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.

* Review fixes for LangGraph agent lab README

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>

* Fix duplicate keys in test-docs workflow

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>

---------

Co-authored-by: micheleRP <michele@redpanda.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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