Skip to content
Nemotron 3 Ultra: Build a 550B Tool-Use Agent — ContentBuffer guide

Nemotron 3 Ultra: Build a 550B Tool-Use Agent

K
Kodetra Technologies··10 min read Intermediate

Summary

Wire NVIDIA's open 550B MoE into a Python tool-calling loop for long-running agents.

Nemotron 3 Ultra: Build a 550B Tool-Use Agent

On June 4, NVIDIA dropped Nemotron 3 Ultra, a 550-billion-parameter Mixture-of-Experts model with only 55B active parameters per token, released fully open: weights, training data, and recipes, under the permissive OpenMDW-1.1 license. It is not a chatbot that happens to do tools. It was post-trained specifically for the thing most teams are struggling with right now: long-running agents that plan, call tools, read observations, delegate, and recover from errors across dozens of turns without losing the plot.

The reason it is everywhere this week is the combination. It hits 95% on Ruler @1M (a million-token context window where rivals like GLM 5.1 and Kimi K2.6 cap out at 256K), runs about 5x faster than other open models in its accuracy class thanks to NVFP4 quantization and a hybrid Mamba-Transformer stack, and it exposes a plain OpenAI-compatible API. That last part is what makes it teachable: if you can write an OpenAI tool-calling loop, you can drive a frontier open agent today.

This guide walks through building a real agentic loop against Nemotron 3 Ultra from scratch in Python: connecting to the API, defining tools the model can call, running the multi-turn tool-use loop, and handling the failure modes that bite everyone the first time. You will finish with a working support-ops agent that inspects tickets, decides what matters, and acts, plus the orchestrator pattern NVIDIA designed the model for.


Why a frontier orchestrator instead of one big model for everything

NVIDIA's framing is worth internalizing because it shapes how you should deploy Ultra. In a long agent run, most steps are routine: format a result, call a tool with obvious arguments, summarize an observation. A small subset of steps are genuinely hard: deciding the plan, synthesizing contradictory evidence, choosing which of five tools to call when none is an obvious fit. Those hard calls are where cheap models drift off-goal and burn turns.

The intended pattern is a system of models: route the hard reasoning and orchestration calls to Ultra, and let a smaller, cheaper model handle high-volume execution and validation. Ultra is built to be the brain that keeps a multi-turn task coherent. We will build the single-model version first because it is the foundation, then show the routing split at the end.


Prerequisites

  • Python 3.9+ and pip install openai (the official OpenAI SDK, v1.x).
  • An API key. The fastest path is a free key from build.nvidia.com (open the Nemotron 3 Ultra model card, click 'Get API Key'). The same code works against OpenRouter, Together AI, Baseten, Fireworks, or a self-hosted NIM with only the base URL and key changed.
  • Basic familiarity with JSON and Python functions. No ML or GPU knowledge required: you are calling a hosted endpoint.

Step 1: Connect and make one call

Nemotron 3 Ultra speaks the OpenAI Chat Completions protocol, so you point the standard OpenAI client at NVIDIA's endpoint and set the model id. Verify the connection with a single message before you build anything on top of it.

# pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://integrate.api.nvidia.com/v1",   # NVIDIA build endpoint
    api_key="nvapi-XXXXXXXX",                          # from build.nvidia.com
)

MODEL = "nvidia/nemotron-3-ultra-550b-a55b"

resp = client.chat.completions.create(
    model=MODEL,
    messages=[{"role": "user",
               "content": "In one sentence, what is Nemotron 3 Ultra built for?"}],
    temperature=0.2,
)
print(resp.choices[0].message.content)

Example output:

Nemotron 3 Ultra is an open 550B Mixture-of-Experts model built to act as the
reasoning and orchestration layer for long-running, tool-using AI agents.

If that returns text, your key and endpoint are good. To switch providers, change only two lines: for OpenRouter use base_url="https://openrouter.ai/api/v1" with the same model id nvidia/nemotron-3-ultra-550b-a55b and your OpenRouter key. Nothing else in this guide changes.


Step 2: Define the tools

An agent is a model plus a set of functions it is allowed to call. You give the model JSON Schemas describing each tool, and it responds by asking you to run one with specific arguments. You run it, hand back the result, and the loop continues. Start with the real Python implementations, then the schemas the model sees.

import json

# --- 1. Real tool implementations (your actual business logic) ---
TICKETS = [
    {"id": 1042, "status": "open",   "title": "Login fails on Safari", "priority": "high"},
    {"id": 1043, "status": "open",   "title": "Typo on pricing page",  "priority": "low"},
    {"id": 1044, "status": "closed", "title": "CSV export broken",      "priority": "high"},
]

def search_tickets(status: str):
    return [t for t in TICKETS if t["status"] == status]

def escalate_ticket(ticket_id: int, reason: str):
    return {"ok": True, "ticket_id": ticket_id,
            "escalated_to": "tier-2", "reason": reason}

DISPATCH = {
    "search_tickets": search_tickets,
    "escalate_ticket": escalate_ticket,
}

# --- 2. Schemas the model can see ---
TOOLS = [
    {"type": "function", "function": {
        "name": "search_tickets",
        "description": "List support tickets filtered by status.",
        "parameters": {
            "type": "object",
            "properties": {
                "status": {"type": "string", "enum": ["open", "closed"]}
            },
            "required": ["status"],
        },
    }},
    {"type": "function", "function": {
        "name": "escalate_ticket",
        "description": "Escalate one ticket to tier-2 support with a short reason.",
        "parameters": {
            "type": "object",
            "properties": {
                "ticket_id": {"type": "integer"},
                "reason":    {"type": "string"},
            },
            "required": ["ticket_id", "reason"],
        },
    }},
]

The description fields are not decoration. They are the only thing the model reads to decide when and how to call a tool. Treat them as prompt engineering: say what the tool does, what each argument means, and when to prefer it. The enum on status stops the model from inventing values like "pending".


Step 3: The long-running tool-use loop

This is the heart of every agent. Each turn, you send the full conversation plus the tool schemas. The model either asks to call one or more tools, or it returns a final answer. If it asks for tools, you run them, append the results, and loop. A max_steps guard is non-negotiable: it is what stops a confused agent from looping forever or drifting off the goal.

def run_agent(goal: str, max_steps: int = 10):
    messages = [
        {"role": "system", "content":
            "You are a support-ops agent. Use the tools to inspect tickets, "
            "decide what matters, then act. When the task is done, reply with a "
            "short summary and stop calling tools."},
        {"role": "user", "content": goal},
    ]

    for step in range(1, max_steps + 1):
        resp = client.chat.completions.create(
            model=MODEL,
            messages=messages,
            tools=TOOLS,
            temperature=0.2,   # keep low for reliable tool use
        )
        msg = resp.choices[0].message
        messages.append(msg)               # 1. keep the assistant turn

        if not msg.tool_calls:             # 2. no tool call => final answer
            return msg.content, step

        for call in msg.tool_calls:        # 3. run every requested tool
            try:
                args = json.loads(call.function.arguments)
                result = DISPATCH[call.function.name](**args)
            except Exception as e:
                result = {"error": str(e)}   # feed errors back, do not crash
            messages.append({
                "role": "tool",
                "tool_call_id": call.id,     # MUST match the call id
                "content": json.dumps(result),
            })

    return "Stopped: hit max_steps before finishing.", max_steps


answer, steps = run_agent(
    "Find every open ticket and escalate any that are high priority.")
print(f"[{steps} steps] {answer}")

Three details make or break this loop. First, you must append the assistant message (the one containing tool_calls) before the tool results, or the API rejects the next request. Second, every tool message needs a tool_call_id that exactly matches the id the model gave you. Third, you must answer every tool call in msg.tool_calls before the next model turn, because Ultra will often request several in parallel.


Step 4: A worked run

Run the script with the goal above. Behind the scenes Ultra plans, then calls the tools across several turns. A representative trace:

Turn 1  assistant -> tool_call: search_tickets(status="open")
        tool      -> [{"id":1042,...,"priority":"high"},
                      {"id":1043,...,"priority":"low"}]
Turn 2  assistant -> tool_call: escalate_ticket(ticket_id=1042,
                       reason="High-priority open login bug affecting Safari users")
        tool      -> {"ok": true, "escalated_to": "tier-2", ...}
Turn 3  assistant -> (no tool calls) final answer

[3 steps] I found 2 open tickets. #1042 (Login fails on Safari) is high priority,
so I escalated it to tier-2. #1043 is a low-priority typo and was left as-is.

Notice the model did not blindly escalate everything. It read the priorities, applied the rule from your goal, and explained its decision. That selective judgment across multiple turns is exactly what Ultra is tuned for, and where weaker models tend to either escalate both tickets or forget to escalate at all.


Step 5: The orchestrator + executor split

Now the pattern NVIDIA actually designed Ultra for. Running every single turn through a 550B model is overkill: most turns are mechanical. The cost-effective shape is to let Ultra own the hard planning turn, then hand routine execution to a small, cheap model. You keep one shared message history; only the model id changes per call.

FRONTIER = "nvidia/nemotron-3-ultra-550b-a55b"   # hard reasoning / planning
FAST     = "nvidia/nemotron-3-super-49b"          # cheap, high-volume execution

def pick_model(step: int, messages) -> str:
    # Turn 1 (the plan) and any turn after an error go to the frontier model.
    last = messages[-1]
    if step == 1:
        return FRONTIER
    if isinstance(last, dict) and last.get("role") == "tool" \
            and '"error"' in (last.get("content") or ""):
        return FRONTIER          # recovery is a "hard call" -> escalate
    return FAST                  # routine tool turns stay cheap

# inside the loop, replace the fixed model with:
#   resp = client.chat.completions.create(
#       model=pick_model(step, messages), messages=messages,
#       tools=TOOLS, temperature=0.2)

This is the lever behind NVIDIA's claim of up to 30% lower cost-to-completion on agentic benchmarks: spend frontier tokens only on the turns that need a frontier brain. Start simple with the rule above (plan and error-recovery go to Ultra, everything else goes to a small model), measure, then refine which turns you promote.

Reasoning depth is also controllable. The Nemotron family toggles its visible thinking through a system directive rather than a numeric parameter, so check the current model card for the exact phrasing before relying on it in production. Turning deep reasoning off for trivial execution turns is another easy cost win.


Common pitfalls

  • Appending tool results without the assistant turn. If you skip messages.append(msg) and jump straight to the tool result, the API returns a 400 about an unmatched tool_call_id. The assistant message that requested the call must sit in the history right before its results.
  • Answering only the first parallel call. Ultra frequently returns several tool calls in one turn. You must append a tool message for each id before the next request, or the model loses track and may repeat calls.
  • Trusting the arguments JSON. call.function.arguments is a string the model generated; it can be malformed or contain unexpected fields. Wrap json.loads and the dispatch in try/except and feed the error text back as the tool result so the model can self-correct instead of your process crashing.
  • No step ceiling. Without max_steps, a misunderstanding becomes an infinite, expensive loop. Always cap it and return a clear 'stopped' message so you can debug the trace.
  • High temperature for tool use. Creativity hurts here. Keep temperature around 0.0 to 0.3 so argument values and tool choices stay deterministic.
  • Letting context balloon. Ultra's 1M-token window means a long run will not error out, but you still pay per token. On runs past a few dozen turns, periodically summarize old tool results into a compact note instead of carrying every raw observation.
  • Hardcoding one provider's model string. The id nvidia/nemotron-3-ultra-550b-a55b is consistent across NVIDIA build and OpenRouter, but some providers prefix differently. Keep the model id and base URL in config, not scattered through your code.

Quick reference

ItemValue
Model idnvidia/nemotron-3-ultra-550b-a55b
Params (active / total)55B active / 550B total (MoE)
Context window1,000,000 tokens (95% on Ruler @1M)
ArchitectureHybrid Mamba-Transformer MoE, NVFP4 precision
LicenseOpenMDW-1.1 (open weights, data, recipes)
NVIDIA endpointhttps://integrate.api.nvidia.com/v1
Other accessOpenRouter, Together AI, Baseten, Fireworks, Ollama, self-host NIM
ProtocolOpenAI Chat Completions (tools + tool_calls)
Best roleOrchestrator / hard reasoning turns in agent loops
ReleasedJune 4, 2026

Next steps

  • Swap the toy ticket store for a real tool: a database query, an HTTP call, or a sandboxed code runner. The loop does not change, only the functions in DISPATCH.
  • Add the orchestrator/executor split and log which model handled each turn, then compare total cost against running Ultra for everything.
  • Wrap untrusted tool execution in a sandbox. NVIDIA's NemoClaw blueprint and OpenShell runtime exist precisely for running agent-generated actions more safely.
  • Stress-test long-horizon behavior: give the agent a goal that needs 15+ tool calls and watch for goal drift, then add periodic context summarization.
  • When you need to specialize, Ultra ships LoRA, full SFT, and RL recipes through the NeMo libraries, so the same model you prototype with is the one you can fine-tune.

The shift Nemotron 3 Ultra represents is that a genuinely frontier-class agent brain is now open, cheap to route to, and a five-line client change away. The hard part was never the API. It is designing the tools and the loop around it, which is exactly what you just built.

Comments

Subscribe to join the conversation...

Be the first to comment

Found this useful?

Get new AI guides for builders by email. Free.

Join 3,605 newsletter subscribers.

Also get