Deep Agents Quickstart for NeMo Relay
This Quickstart Guide walks you through the process for running one Deep Agents workflow and writing its agent, model, and tool lifecycle to a local Agent Trajectory Observability Format (ATOF) file. For detailed setup, refer to the Installation Guide.
Use the event relationships to follow model and tool work through a run and check where the expected activity occurred.
Prerequisites
Before you start, make sure you have:
- Python 3.11 or newer
uv- Inference access: an NVIDIA API key for this example, or credentials for your own provider
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
Deep Agents and NVIDIA model provider extras.
For an existing uv project, run only the uv add command from its directory.
Set up your API key
Set your NVIDIA API key for the current shell:
Unix shell
Windows PowerShell
- Relay does not impose a model choice. This copyable example selects the public
nvidia/nemotron-3-nano-omni-30b-a3b-reasoningmodel through the NVIDIA provider. To use another model or provider, replace the example’smodelargument and configure that provider’s credentials. The NVIDIA provider readsNVIDIA_API_KEY. In the LangChain string, the firstnvidia:selects the provider; the remainingnvidia/...value is the model ID. - The provider can warn that this model is “not known to support tools” when its capability catalog lags the endpoint. This warning is advisory; the run must still produce the actual tool result and all three success lines below.
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 agent
The example creates a Deep Agents agent with one marker tool.
add_nemo_relay_integration adds Relay-aware middleware, including supported
subagent instrumentation. NemoRelayDeepAgentsCallbackHandler records the
framework lifecycle. Plugin activation loads plugins.toml, the single outer
deepagents-request scope groups the request, and flushing finishes writing
queued events before verification. You do not need to add a Relay mark around
every operation.
In your own agent, keep that integration and activation lifecycle, replace the marker tool and prompt, and use an outer scope for the request you own. The marker and event-file assertions are quick-start validation code.
Save this file as quickstart.py beside plugins.toml:
Run it from the project directory:
Verify the output
The program checks the tool result, final assistant response, and paired ATOF agent, tool, and LLM records. A successful run prints these markers in order:
The model can use different wording around the response marker. These checks validate a live provider call; they do not make the model deterministic.
Inspect the Recorded Activity
Print one completed model call from the event file:
category and name identify the recorded work. The same uuid pairs its
start and end records; parent_uuid connects it to its enclosing scope.
timestamp records when this event occurred. For model calls, category_profile
and metadata can include the model identity and completion status, depending
on the integration. These fields let you follow a call through the run without
requiring full prompt or response capture.
Next Steps
Now that you have a working setup, you should explore the following resources in greater detail: