For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • About NVIDIA NeMo Relay
    • Overview
    • Architecture
    • Ecosystem
    • Concepts
    • Release Notes
  • Getting Started
    • Agent Runtime Primer
    • Prerequisites
    • Installation
    • Configuration / Setup
    • Quick Start
  • NVIDIA NeMo Relay CLI
    • About
    • Basic Usage
    • Claude Code
    • Codex
    • Cursor
    • Hermes Agent
  • Supported Integrations
    • About
    • OpenClaw Plugin Guide
    • LangChain Integration Guide
    • LangGraph Integration Guide
    • Deep Agents Integration Guide
  • Instrument Applications
    • About
    • Adding Scopes and Marks
    • Instrument a Tool Call
    • Instrument an LLM Call
    • Add Middleware
    • Code Examples
  • Observability Plugin
    • About
    • Configuration
    • Agent Trajectory Interchange Format (ATIF)
    • Agent Trajectory Observability Format (ATOF)
    • OpenTelemetry
    • OpenInference
  • Adaptive Plugin
    • About
    • Configuration
    • Adaptive Cache Governor (ACG)
    • Adaptive Hints
  • NeMo Guardrails Plugin
    • About
    • Configuration
  • Integrate into Frameworks
    • About
    • Adding Scopes
    • Wrap Tool Calls
    • Wrap LLM Calls
    • Handle Non-Serializable Data
    • Using Codecs
    • Provider Codecs
    • Provider Response Codecs
    • Code Examples
  • Build Plugins
    • About
    • Define a Plugin
    • Validate Plugin Configuration
    • Plugin Configuration Files
    • Register Plugin Behavior
    • Design Plugin Configuration
    • NeMo Guardrails Example Plugin
    • Code Examples
  • Contribute
    • About
    • Development Setup
    • Workflow and Reviews
    • Testing and Documentation
  • Reference
    • APIs
    • Performance
  • Resources
    • Support and FAQs
    • Glossary
    • Troubleshooting Guide
    • Community
    • Legal
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogo
On this page
  • Setup
  • Usage Example
  • Observability
Supported Integrations

NeMo Relay LangChain Integration

||View as Markdown|
Previous

OpenClaw Plugin Guide

Next

NeMo Relay LangGraph Integration

Use the nemo_relay.integrations.langchain package to add NeMo Relay observability to LangChain agents.

Setup

Install the LangChain integration extra in your application environment.

uv
pip
$uv add "nemo-relay[langchain]"

The example below uses the NVIDIA LangChain provider. Install that provider extra too if you want to run the example as written:

uv
pip
$uv add "nemo-relay[langchain,langchain-nvidia]"

Usage Example

1import asyncio
2
3import nemo_relay
4from langchain.agents import create_agent
5from langchain_core.tools import tool
6from nemo_relay.integrations.langchain import NemoRelayCallbackHandler, NemoRelayMiddleware
7
8@tool
9def get_weather(location: str) -> str:
10 """Get the current weather for a location."""
11 return f"The weather in {location} is sunny and 72 degrees."
12
13agent = create_agent(
14 model="nvidia:nvidia/nemotron-3-nano-30b-a3b",
15 tools=[get_weather],
16 middleware=[NemoRelayMiddleware()],
17 system_prompt="Use tools when they are relevant. Keep the final answer brief.",
18)
19
20input_payload = {
21 "messages": [
22 {
23 "role": "user",
24 "content": "What is the weather in San Francisco?",
25 }
26 ]
27}
28
29with nemo_relay.scope.scope("langchain-request", nemo_relay.ScopeType.Agent):
30 result = asyncio.run(
31 agent.ainvoke(input_payload, config={"callbacks": [NemoRelayCallbackHandler()]})
32 )
33
34final_message = result["messages"][-1]
35print(f"Final response: {final_message.content}")

Observability

Refer to Observability for details on exporting NeMo Relay observability data to third-party systems.