> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/fabric/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/fabric/_mcp/server.

# Use the LangChain Deep Agents Adapter

> Install and configure the NeMo Fabric harness integration for LangChain Deep Agents.

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:

```bash
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:

```bash
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:

```bash
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:

```bash
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`:

```python
from nemo_fabric import HarnessConfig

harness = 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:

```python
from nemo_fabric import HarnessConfig

harness = HarnessConfig(
    adapter_id="nvidia.fabric.langchain.deepagents",
    settings={
        "deepagents": {
            "interrupt_on": {
                "write_file": {
                    "allowed_decisions": ["approve", "edit", "reject"],
                    "description": "Review this file write.",
                }
            },
            "subagents": [
                {
                    "name": "researcher",
                    "description": "Researches the workspace before implementation.",
                    "system_prompt": "Investigate the request and return concise findings.",
                }
            ],
        }
    },
)
```

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](https://github.com/NVIDIA/NeMo-Fabric/tree/0.1.0/adapters/deepagents).