LangGraph Quickstart for NeMo Relay
This Quickstart Guide walks you through the process for running one credential-free LangGraph workflow and writing its lifecycle to a local Agent Trajectory Observability Format (ATOF) file. For detailed setup, refer to the Installation Guide.
Use the recorded parent/child scopes to follow a workflow through its nodes when debugging execution.
Prerequisites
Before you start, make sure you have:
- Python 3.11 or newer
uv
Quickstart Steps
To quickly get started with NeMo Relay, complete the following steps:
Install NeMo Relay
Create a project and install the NeMo Relay version for these docs with the
LangGraph extra.
For an existing uv project, run only the uv add command from its directory.
Configure the plugin
plugins.toml enables Relay’s observability component and writes its events
to logs/events.jsonl. In your own project, use the same plugin configuration
with the integration code below; the marker task and success checks are only
the quick start’s validation example.
Save the following configuration as plugins.toml in your project directory:
ATOF output can contain sensitive prompts, responses, tool arguments, and tool
results. Protect logs/events.jsonl even when full payload export is disabled.
Run the graph
The example runs one local emit_marker graph node, with no inference
request or credentials. NemoRelayCallbackHandler records the graph lifecycle,
and the explicit langgraph-request scope groups its node activity. Plugin
activation loads plugins.toml; flushing finishes writing queued events before
verification. In your project, replace the marker graph with your workflow and
retain the callback, request scope, and activation lifecycle.
Save this file as quickstart.py beside plugins.toml:
Run it from the project directory:
Verify the output
The program checks the event file for matching start and end records from the
emit_marker graph node. A successful run prints these markers in order:
This deterministic path needs no model credentials. After it works, add a model and tool node to observe a full agent workflow.
Inspect the Recorded Activity
Print one completed graph node from the event file:
The node is an agent scope named emit_marker. Its parent_uuid links to
the immediate LangGraph scope, whose parent is the outer langgraph-request
scope. The node’s uuid pairs its start and end records. timestamp records
when each event occurred. This local graph makes no model request; the records
demonstrate workflow structure.
Next Steps
Now that you have a working setup, you should explore the following resources in greater detail: