LangGraph Quick Start
Goal
Run one credential-free LangGraph workflow and write its lifecycle to a local Agent Trajectory Observability Format (ATOF) file.
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
Install
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
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 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 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.
For More Details
For more details, refer to: