Deep Agents Quick Start
Goal
Run one Deep Agents workflow and write its agent, model, and tool lifecycle to a local Agent Trajectory Observability Format (ATOF) file.
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
Install
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 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-reasoning
model through the NVIDIA provider. To use another model or provider, replace
the example’s model argument and configure that provider’s credentials.
The NVIDIA provider reads NVIDIA_API_KEY. In the LangChain string, the first nvidia:
selects the provider; the remaining nvidia/... 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
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 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 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.
For More Details
For more details, refer to: