Announcing our Series F. Learn more

Building with NVIDIA Nemotron 3 Ultra and LangChain Deep Agents Code on Baseten

Build frontier AI agents with NVIDIA Nemotron 3 Ultra and LangChain Deep Agents on Baseten—top open-model agent accuracy at ~10× lower cost.

Build frontier AI agents with NVIDIA Nemotron 3 Ultra and LangChain Deep Agents on Baseten—top open-model agent accuracy at ~10× lower cost with zero setup.

As harnesses have become more load-bearing within AI applications, model-harness co-development increasingly drives capabilities beyond a model’s original baseline. For application developers who develop and own both the model and the harness, this cycle of improvement has been apparent for some time. But developers building on open models and third-party harnesses have not enjoyed that same access.

This changed with LangChain Deep Agents harness profiles. These model-specific profiles encode changes to prompts, tool descriptions, middleware, and subagents to match harness behavior to the quirks of the model.

Today, the LangChain team is releasing a tuned Deep Agents harness profile for NVIDIA Nemotron 3 Ultra. With the harness profile in place, NVIDIA Nemotron 3 Ultra achieves top agent accuracy among open models on the LangChain Deep Agents evaluation suite at approximately 10x lower cost than leading closed alternatives.

Achieving these performance results did not require fine-tuning the underlying model or making any changes to serving infrastructure. As such, it works out of the box with Baseten’s fast, cost-effective model API for NVIDIA Nemotron 3 Ultra. Below, I’ll walk you through the process of setting up NVIDIA Nemotron 3 Ultra on Baseten with LangChain Deep Agents Code.

Setting up LangChain Deep Agents Code (dcode) with Baseten

The system we’ll be building has four components:

  • The model: NVIDIA Nemotron 3 Ultra.

  • The inference provider: Baseten, which hosts NVIDIA Nemotron 3 Ultra as a model API.

  • The harness: LangChain dcode, an open-source package.

  • The profile: A set of model-specific modifications made to LangChain Deep Agents.

However, setup is just two steps.

First, install the latest version of LangChain dcode with Baseten support.

!curl -LsSf https://langch.in/dcode | bash
!dcode --install baseten --yes

Then, grab your Baseten API key – or create an account if you don’t already have one – and make sure it is set in your environment as BASETEN_API_KEY.

From there, the model slug baseten:nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B will be available to use within dcode. The harness profile for NVIDIA Nemotron 3 Ultra is automatically applied as the model is detected, no additional steps are required to install or activate the harness profile.

Building a simple agent

For this example, we’ll build an agent designed to review proposed workflows and flag potential compliance errors. This is a highly simplified version of the type of agent being built across multiple industries like financial services and healthcare. For these agents, both high accuracy and low cost per task are vital for moving to production.

Let’s imagine a couple of sample workflows as inputs to the agent.

1demo_dir = Path("readiness_demo")
2demo_dir.mkdir(exist_ok=True)
3
4(demo_dir / "workflow_packet.md").write_text(
5    """# Workflow Packet
6
7Workflow: Launch a new patient billing exception process.
8
9Policy excerpts:
10- Any workflow that touches PHI must satisfy control HC-17.
11- Billing exception workflows must document why each data field is necessary.
12- If evidence is missing, create a risk ticket before launch.
13
14Evidence packet:
15- The workflow stores patient name, account number, diagnosis code, and balance.
16- The packet explains account number and balance, but not diagnosis code.
17- The launch owner says the process should go live tomorrow.
18""",
19    encoding="utf-8",
20)
21
22(demo_dir / "controls.md").write_text(
23    """# Controls
24
25## HC-17: PHI minimum necessary review
26
27Owner: Compliance
28
29Requirement: The launch packet must document a business purpose for every PHI data field used by the workflow.
30""",
31    encoding="utf-8",
32)
33
34print(f"Created demo files in {demo_dir.resolve()}")

We’ll use NVIDIA Nemotron 3 Ultra to process these tickets via dcode. As a reminder, the harness profile is automatically applied based on the model slug.

1import subprocess
2import textwrap
3
4prompt = textwrap.dedent(
5    """
6    You are a regulated workflow readiness agent.
7
8    Read workflow_packet.md and controls.md in the current directory.
9
10    Assess whether the workflow is ready to launch. If evidence is missing,
11    create a file named risk_ticket.md with a mock ticket ID, severity, title,
12    and summary. Then create readiness_memo.md with exactly these sections:
13
14    1. Readiness decision
15    2. Evidence found
16    3. Missing evidence
17    4. Risk ticket opened
18    5. Executive summary
19
20    Keep the memo concise and include the concrete risk ticket ID.
21    """
22).strip()
23
24completed = subprocess.run(
25    [
26        DCODE,
27        "--model",
28        "baseten:nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",
29        "--auto-approve",
30        "--non-interactive",
31        prompt,
32    ],
33    cwd=demo_dir,
34    env=os.environ.copy(),
35    text=True,
36    capture_output=True,
37    timeout=600,
38)
39
40print(completed.stdout)
41if completed.stderr:
42    print(completed.stderr)
43if completed.returncode != 0:
44    raise RuntimeError(f"dcode exited with code {completed.returncode}")
45

The agent reads the tickets using its file-reading tools, then uses file-writing tools to create outputs. This could be expanded with tools for creating tickets, writing slack messages, and updating project statuses by implementing these tools into the harness.

While production agents are substantially more complex, this example shows that applying the model-specific harness profile requires almost no code changes within dcode to access frontier performance at approximately 10x lower cost than leading closed alternatives.

With Baseten’s NVIDIA Nemotron 3 Ultra model API and LangChain Deep Agents Code, you can get started building frontier agents today.

Subscribe to our newsletter

Stay up to date on model performance, inference infrastructure, and more.