Use the LangChain Deep Agents Adapter

View as Markdown

The NVIDIA NeMo Fabric nvidia.fabric.langchain.deepagents adapter runs LangChain Deep Agents in the persistent NeMo Fabric Python adapter host. The adapter maps normalized NeMo Fabric configuration into the model, tools, skills, Model Context Protocol (MCP) servers, workspace, and telemetry.

Install the Adapter

To install the NeMo Fabric runtime, adapter, and supported LangChain Deep Agents dependencies in one environment:

$pip install "nemo-fabric[deepagents]"

To install the adapter and supported Deep Agents stack without the NeMo Fabric runtime, use the adapter package’s harness extra:

$pip install "nemo-fabric-adapters-deepagents[harness]"

The adapter package also provides relay and full extras. Use relay when the environment already manages the Deep Agents stack. Use full to install the stack and NeMo Relay Python package together.

If the environment already manages a compatible Deep Agents stack, install only the adapter:

$pip install nemo-fabric-adapters-deepagents

The bare adapter package does not install the NeMo Fabric runtime or harness. Use deepagents>=0.6.12,<0.7.0, langchain>=1.3,<2.0, and langgraph>=1.2,<2.0, the constraints supported by this release.

If the existing compatible Deep Agents stack and NeMo Fabric runtime share an environment, install the runtime and bare adapter together:

$pip install nemo-fabric nemo-fabric-adapters-deepagents

For separate environments, set ADAPTER_PYTHON in the runtime environment to the adapter environment’s Python interpreter. Use matching NeMo Fabric release versions for the runtime and adapter package unless a different pairing has been explicitly validated.

Configure the Adapter

Select the LangChain Deep Agents harness integration in HarnessConfig:

1from nemo_fabric import HarnessConfig
2
3harness = HarnessConfig(adapter_id="nvidia.fabric.langchain.deepagents")

Use normalized FabricConfig fields to configure the model, workspace, skills, MCP servers, blocked tools, and telemetry. Use harness.settings.deepagents to configure the JSON-serializable Deep Agents-native interrupt_on and subagents options:

1from nemo_fabric import HarnessConfig
2
3harness = HarnessConfig(
4 adapter_id="nvidia.fabric.langchain.deepagents",
5 settings={
6 "deepagents": {
7 "interrupt_on": {
8 "write_file": {
9 "allowed_decisions": ["approve", "edit", "reject"],
10 "description": "Review this file write.",
11 }
12 },
13 "subagents": [
14 {
15 "name": "researcher",
16 "description": "Researches the workspace before implementation.",
17 "system_prompt": "Investigate the request and return concise findings.",
18 }
19 ],
20 }
21 },
22)

The descriptor closes both harness.settings and its nested deepagents object, so planning rejects unknown settings before runtime start. interrupt_on maps tool names to booleans or an object with allowed_decisions; supported decisions are approve, edit, reject, and respond. The object can also contain a static description and an args_schema JSON Schema.

subagents accepts declarative synchronous subagents and Agent Protocol asynchronous subagents. A declarative subagent requires name, description, and system_prompt. An asynchronous subagent requires name, description, and graph_id. Refer to the adapter guide for the supported optional fields. Python middleware, permission objects, Python tool objects, and precompiled subagents cannot cross the JSON configuration boundary. NeMo Fabric rejects an asynchronous subagent when tools.enabled or tools.blocked is configured because a local tools policy cannot gate remote tools.

Understand the Runtime Lifecycle

Each NeMo Fabric runtime compiles one Deep Agents graph and retains its checkpointer and LangGraph thread across ordered invocations. The built-in subagent inherits the parent run’s model, tools, skills, workspace, telemetry, and permissions.

NeMo Relay provides the SDK-native observability integration for this adapter. Native OpenTelemetry and OpenInference exporters are also available through the model provider configuration.

For the complete configuration, subagent, lifecycle, and telemetry reference, refer to the LangChain Deep Agents adapter guide.