NeMo Relay with LangGraph
How to use NVIDIA NeMo Relay with LangChain and LangGraph
NVIDIA NeMo Relay attaches to an agent you already have, so you do not rewrite it. For a LangChain agent you add a Relay middleware. For a LangGraph graph you make one call that configures the graph to report to Relay. From then on every model call and tool call is recorded, and you can add a guardrail on a tool, redaction of personal data and cost tracking. We did this with NeMo Relay 0.11.1 in November 2026 and it worked with no fixes.
What you get
| Feature | How you turn it on | What we saw |
|---|---|---|
| Tracing | Add the middleware to a LangChain agent, or configure a LangGraph graph | Agent, model and tool steps recorded with timing |
| Tool guardrail | Register a condition for a tool | The tool was blocked when the condition was not met |
| Redaction | Enable the redaction plugin | Personal data removed from the record |
| Cost tracking | Enable the pricing plugin with a price catalogue | Token use turned into cost per run |
| Export | Choose event files, agent trajectories or OpenTelemetry | Files written per run |
The steps
- Install NeMo Relay into the same Python environment as your agent.
- For LangChain, pass the Relay middleware when you create the agent. For LangGraph, call the Relay function that configures a compiled graph.
- Run the agent as usual. Relay records the run.
- Add the plugins you need: a conditional guardrail on a tool, redaction, pricing.
- Choose where the record goes: a file, an OpenTelemetry collector, or NeMo Helix.
What to watch for
- The price catalogue needs a setting that says how cached tokens are counted. Without it, cost tracking does not start.
- A failed run is recorded in Relay's event file with the error, but the trajectory it exports does not mark the run as failed. Check the event file, not only the trajectory. We reported this to NVIDIA.
- Relay was before version 1.0 in November 2026, and alpha builds of 1.0 were appearing daily. Pin the version.
- Relay records and controls calls. It is not a place to view traces. Send the record to a tool that shows them.
If you are moving from the NeMo Agent Toolkit
Relay is the successor for the tracing, middleware and governance parts of the toolkit. Tracing is the safest part to move first, because it does not change what the agent does. Keep the agent logic in LangChain or LangGraph, attach Relay, compare the records with what the toolkit produced, and only then remove the toolkit's tracing.
Where Katonic fits
Katonic gives an organisation tracing, guardrails and cost control across all its agents without wiring each one by hand. Every agent built in Katonic is a declarative definition that compiles to NVIDIA's open agent software, and Katonic's NeMo Fabric adapter can turn NeMo Relay on for an agent it runs.
Read next
- What is NVIDIA NeMo Relay? →
- How to migrate from the NVIDIA NeMo Agent Toolkit →
- How to write a NeMo Fabric adapter →
- NVIDIA NeMo Helix, Relay and Fabric: field guide →
- Issue 4091: failed runs stored as success →
- NeMo Relay on GitHub →
Questions and answers
Does NVIDIA NeMo Relay work with LangGraph?
Yes. One call configures a compiled LangGraph graph to report to Relay. It worked with no fixes in our test of version 0.11.1.
Does NeMo Relay work with LangChain?
Yes. You add a Relay middleware when you create the agent.
Do I have to rewrite my agent to use NeMo Relay?
No. Relay attaches to the agent you have. The agent logic stays in LangChain or LangGraph.
Can NeMo Relay block a tool call?
Yes. You register a condition for a tool, and the tool runs only when the condition is met.
Can NeMo Relay track cost?
Yes, with the pricing plugin and a price catalogue you supply.
Where do NeMo Relay traces go?
To event files, to agent trajectory files, to an OpenTelemetry collector, or to NeMo Helix.
