Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/about/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ For details on the baseline rules, refer to [Network Policies](../reference/netw

- Follow the [Quickstart](../get-started/quickstart.md) to launch your first sandbox.
- Refer to the [Architecture](../reference/architecture.md) for the full technical structure, including file layouts and the blueprint lifecycle.
- Refer to [Inference Profiles](../reference/inference-profiles.md) for detailed provider configuration.
- Refer to [Inference Options](../inference/inference-options.md) for detailed provider configuration.
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
"sphinxcontrib.mermaid",
"json_output",
"search_assets",
"sphinx_reredirects",
]

redirects = {
"reference/inference-profiles": "../inference/inference-options.html",
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

autodoc_default_options = {
"members": True,
"undoc-members": False,
Expand Down
11 changes: 6 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ CLI commands for launching, connecting, monitoring, and managing sandboxes.
{bdg-secondary}`Reference`
:::

:::{grid-item-card} Inference Profiles
:link: reference/inference-profiles
:::{grid-item-card} Inference Options
:link: inference/inference-options
:link-type: doc

NVIDIA endpoint inference configuration and available models.
Providers available during onboarding and how inference routing works.

+++
{bdg-secondary}`Reference`
{bdg-secondary}`Concept`
:::

:::{grid-item-card} How It Works
Expand Down Expand Up @@ -231,6 +231,8 @@ Quickstart <get-started/quickstart>
:caption: Inference
:hidden:

Inference Options <inference/inference-options>
Use Local Inference <inference/use-local-inference>
Switch Inference Providers <inference/switch-inference-providers>
```

Expand Down Expand Up @@ -279,7 +281,6 @@ Back Up and Restore <workspace/backup-restore>

Architecture <reference/architecture>
Commands <reference/commands>
Inference Profiles <reference/inference-profiles>
Network Policies <reference/network-policies>
Troubleshooting <reference/troubleshooting>
```
Expand Down
80 changes: 80 additions & 0 deletions docs/inference/inference-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title:
page: "NemoClaw Inference Options"
nav: "Inference Options"
description:
main: "Inference providers available during NemoClaw onboarding and how the routed inference model works."
agent: "Lists all inference providers offered during NemoClaw onboarding. Use when explaining which providers are available, what the onboard wizard presents, or how inference routing works."
keywords: ["nemoclaw inference options", "nemoclaw onboarding providers", "nemoclaw inference routing"]
topics: ["generative_ai", "ai_agents"]
tags: ["openclaw", "openshell", "inference_routing", "nemoclaw"]
content:
type: concept
difficulty: technical_beginner
audience: ["developer", "engineer"]
status: published
---

<!--
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

# Inference Options
Comment on lines +3 to +23

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align H1 with title.page.

Line 23 (# Inference Options) does not match Line 3 (NemoClaw Inference Options). Keep them identical for page-structure consistency.
As per coding guidelines, "H1 heading matches the title.page frontmatter value."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/inference/inference-options.md` around lines 3 - 23, The H1 heading at
the bottom ("# Inference Options") does not match the frontmatter page value
("NemoClaw Inference Options"); update the H1 to exactly match the frontmatter
page/title by changing the header to "# NemoClaw Inference Options" (or
alternatively change the frontmatter page field to "Inference Options" if you
intend the shorter title) so that the H1 and the page frontmatter (page/title)
are identical.


NemoClaw supports multiple inference providers.
During onboarding, the `nemoclaw onboard` wizard presents a numbered list of providers to choose from.
Your selection determines where the agent's inference traffic is routed.

## How Inference Routing Works

The agent inside the sandbox talks to `inference.local`.
It never connects to a provider directly.
OpenShell intercepts inference traffic on the host and forwards it to the provider you selected.

Provider credentials stay on the host.
The sandbox does not receive your API key.

## Provider Options

The onboard wizard presents the following provider options by default.
The first six are always available.
Ollama appears when it is installed or running on the host.

| Option | Description | Curated models |
|--------|-------------|----------------|
| NVIDIA Endpoints | Routes to models hosted on [build.nvidia.com](https://build.nvidia.com). You can also enter any model ID from the catalog. Set `NVIDIA_API_KEY`. | Nemotron 3 Super 120B, Kimi K2.5, GLM-5, MiniMax M2.5, GPT-OSS 120B |
| OpenAI | Routes to the OpenAI API. Set `OPENAI_API_KEY`. | `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.4-pro-2026-03-05` |
| Other OpenAI-compatible endpoint | Routes to any server that implements `/v1/chat/completions`. The wizard prompts for a base URL and model name. Works with OpenRouter, LocalAI, llama.cpp, or any compatible proxy. Set `COMPATIBLE_API_KEY`. | You provide the model name. |
| Anthropic | Routes to the Anthropic Messages API. Set `ANTHROPIC_API_KEY`. | `claude-sonnet-4-6`, `claude-haiku-4-5`, `claude-opus-4-6` |
| Other Anthropic-compatible endpoint | Routes to any server that implements the Anthropic Messages API (`/v1/messages`). The wizard prompts for a base URL and model name. Set `COMPATIBLE_ANTHROPIC_API_KEY`. | You provide the model name. |
| Google Gemini | Routes to Google's OpenAI-compatible endpoint. Set `GEMINI_API_KEY`. | `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3-flash-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite` |
| Local Ollama | Routes to a local Ollama instance on `localhost:11434`. NemoClaw detects installed models, offers starter models if none are present, pulls and warms the selected model, and validates it. | Selected during onboarding. For more information, refer to [Use a Local Inference Server](use-local-inference.md). |

## Experimental Options

The following local inference options require the `NEMOCLAW_EXPERIMENTAL=1` environment variable and do not appear in the selection list during onboarding.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

| Option | Condition | Notes |
|--------|-----------|-------|
| Local NVIDIA NIM | NIM-capable GPU detected | Pulls and manages a NIM container. |
| Local vLLM | vLLM running on `localhost:8000` | Auto-detects the loaded model. |

For setup instructions, refer to [Use a Local Inference Server](use-local-inference.md).

## Validation

NemoClaw validates the selected provider and model before creating the sandbox.
If validation fails, the wizard returns to provider selection.

| Provider type | Validation method |
|---|---|
| OpenAI-compatible | Tries `/responses` first, then `/chat/completions`. |
| Anthropic-compatible | Tries `/v1/messages`. |
| NVIDIA Endpoints (manual model entry) | Validates the model name against the catalog API. |
| Compatible endpoints | Sends a real inference request because many proxies do not expose a `/models` endpoint. |

## Related Topics

- [Use a Local Inference Server](use-local-inference.md) for Ollama, vLLM, NIM, and compatible-endpoint setup details.
- [Switch Inference Models](switch-inference-providers.md) for changing the model at runtime without re-onboarding.
2 changes: 1 addition & 1 deletion docs/inference/switch-inference-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ The output includes the active provider, model, and endpoint.

## Related Topics

- [Inference Profiles](../reference/inference-profiles.md) for full profile configuration details.
- [Inference Options](inference-options.md) for the full list of providers available during onboarding.
217 changes: 217 additions & 0 deletions docs/inference/use-local-inference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
---
title:
page: "Use a Local Inference Server with NemoClaw"
nav: "Use Local Inference"
description:
main: "Connect NemoClaw to a local model server such as Ollama, vLLM, TensorRT-LLM, or any OpenAI-compatible endpoint."
agent: "Connects NemoClaw to a local inference server. Use when setting up Ollama, vLLM, TensorRT-LLM, NIM, or any OpenAI-compatible local model server with NemoClaw."
keywords: ["nemoclaw local inference", "ollama nemoclaw", "vllm nemoclaw", "local model server", "openai compatible endpoint"]
topics: ["generative_ai", "ai_agents"]
tags: ["openclaw", "openshell", "inference_routing", "local_inference"]
content:
type: how_to
difficulty: intermediate
audience: ["developer", "engineer"]
status: published
---

<!--
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

# Use a Local Inference Server
Comment on lines +3 to +23

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Match H1 with title.page.

Line 23 (# Use a Local Inference Server) should exactly match Line 3 (Use a Local Inference Server with NemoClaw).
As per coding guidelines, "H1 heading matches the title.page frontmatter value."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/inference/use-local-inference.md` around lines 3 - 23, The H1 heading
does not match the frontmatter title.page value; update the document so the H1
exactly matches the frontmatter string "Use a Local Inference Server with
NemoClaw" (change the current H1 "# Use a Local Inference Server" to "# Use a
Local Inference Server with NemoClaw") ensuring the title.page frontmatter and
the H1 are identical.


NemoClaw can route inference to a model server running on your machine instead of a cloud API.
This page covers Ollama, compatible-endpoint paths for other servers, and two experimental options for vLLM and NVIDIA NIM.

All approaches use the same `inference.local` routing model.
The agent inside the sandbox never connects to your model server directly.
OpenShell intercepts inference traffic and forwards it to the local endpoint you configure.

## Prerequisites

- NemoClaw installed.
Refer to the [Quickstart](../get-started/quickstart.md) if you have not installed yet.
- A local model server running, or Ollama installed. The NemoClaw onboard wizard can also start Ollama for you.

## Ollama

Ollama is the default local inference option.
The onboard wizard detects Ollama automatically when it is installed or running on the host.

If Ollama is not running, NemoClaw starts it for you.
On macOS, the wizard also offers to install Ollama through Homebrew if it is not present.

Run the onboard wizard.

```console
$ nemoclaw onboard
```

Select **Local Ollama** from the provider list.
NemoClaw lists installed models or offers starter models if none are installed.
It pulls the selected model, loads it into memory, and validates it before continuing.

### Non-Interactive Setup

```console
$ NEMOCLAW_PROVIDER=ollama \
NEMOCLAW_MODEL=qwen2.5:14b \
nemoclaw onboard --non-interactive
```

If `NEMOCLAW_MODEL` is not set, NemoClaw selects a default model based on available memory.

| Variable | Purpose |
|---|---|
| `NEMOCLAW_PROVIDER` | Set to `ollama`. |
| `NEMOCLAW_MODEL` | Ollama model tag to use. Optional. |

## OpenAI-Compatible Server

This is the most flexible path and works with any server that implements `/v1/chat/completions`, including vLLM, TensorRT-LLM, llama.cpp, LocalAI, and others.

Start your model server.
The examples below use vLLM, but any OpenAI-compatible server works.

```console
$ vllm serve meta-llama/Llama-3.1-8B-Instruct --port 8000
```

Run the onboard wizard.

```console
$ nemoclaw onboard
```

When the wizard asks you to choose an inference provider, select **Other OpenAI-compatible endpoint**.
Enter the base URL of your local server, for example `http://localhost:8000/v1`.

The wizard prompts for an API key.
If your server does not require authentication, enter any non-empty string (for example, `dummy`).

NemoClaw validates the endpoint by sending a test inference request before continuing.

### Non-Interactive Setup

Set the following environment variables for scripted or CI/CD deployments.

```console
$ NEMOCLAW_PROVIDER=custom \
NEMOCLAW_ENDPOINT_URL=http://localhost:8000/v1 \
NEMOCLAW_MODEL=meta-llama/Llama-3.1-8B-Instruct \
COMPATIBLE_API_KEY=dummy \
nemoclaw onboard --non-interactive
```

| Variable | Purpose |
|---|---|
| `NEMOCLAW_PROVIDER` | Set to `custom` for an OpenAI-compatible endpoint. |
| `NEMOCLAW_ENDPOINT_URL` | Base URL of the local server. |
| `NEMOCLAW_MODEL` | Model ID as reported by the server. |
| `COMPATIBLE_API_KEY` | API key for the endpoint. Use any non-empty value if authentication is not required. |

## Anthropic-Compatible Server

If your local server implements the Anthropic Messages API (`/v1/messages`), choose **Other Anthropic-compatible endpoint** during onboarding instead.

```console
$ nemoclaw onboard
```

For non-interactive setup, use `NEMOCLAW_PROVIDER=anthropicCompatible` and set `COMPATIBLE_ANTHROPIC_API_KEY`.

```console
$ NEMOCLAW_PROVIDER=anthropicCompatible \
NEMOCLAW_ENDPOINT_URL=http://localhost:8080 \
NEMOCLAW_MODEL=my-model \
COMPATIBLE_ANTHROPIC_API_KEY=dummy \
nemoclaw onboard --non-interactive
```

## vLLM Auto-Detection (Experimental)

When vLLM is already running on `localhost:8000`, NemoClaw can detect it automatically and query the `/v1/models` endpoint to determine the loaded model.

Set the experimental flag and run onboard.

```console
$ NEMOCLAW_EXPERIMENTAL=1 nemoclaw onboard
```

Select **Local vLLM [experimental]** from the provider list.
NemoClaw detects the running model and validates the endpoint.

:::{note}
NemoClaw forces the `chat/completions` API path for vLLM.
The vLLM `/v1/responses` endpoint does not run the `--tool-call-parser`, so tool calls arrive as raw text.
:::

### Non-Interactive Setup

```console
$ NEMOCLAW_EXPERIMENTAL=1 \
NEMOCLAW_PROVIDER=vllm \
nemoclaw onboard --non-interactive
```

NemoClaw auto-detects the model from the running vLLM instance.
To override the model, set `NEMOCLAW_MODEL`.

## NVIDIA NIM (Experimental)

NemoClaw can pull, start, and manage a NIM container on hosts with a NIM-capable NVIDIA GPU.

Set the experimental flag and run onboard.

```console
$ NEMOCLAW_EXPERIMENTAL=1 nemoclaw onboard
```

Select **Local NVIDIA NIM [experimental]** from the provider list.
NemoClaw filters available models by GPU VRAM, pulls the NIM container image, starts it, and waits for it to become healthy before continuing.

:::{note}
NIM uses vLLM internally.
The same `chat/completions` API path restriction applies.
:::

### Non-Interactive Setup

```console
$ NEMOCLAW_EXPERIMENTAL=1 \
NEMOCLAW_PROVIDER=nim \
nemoclaw onboard --non-interactive
```

To select a specific model, set `NEMOCLAW_MODEL`.

## Verify the Configuration

After onboarding completes, confirm the active provider and model.

```console
$ nemoclaw <name> status
```

The output shows the provider label (for example, "Local vLLM" or "Other OpenAI-compatible endpoint") and the active model.

## Switch Models at Runtime

You can change the model without re-running onboard.
Refer to [Switch Inference Models](switch-inference-providers.md) for the full procedure.

For compatible endpoints, the command is:

```console
$ openshell inference set --provider compatible-endpoint --model <model-name>
```

If the provider itself needs to change (for example, switching from vLLM to a cloud API), rerun `nemoclaw onboard`.

## Related Topics

- [Inference Options](inference-options.md) for the full list of providers available during onboarding.
- [Switch Inference Models](switch-inference-providers.md) for runtime model switching.
- [Quickstart](../get-started/quickstart.md) for first-time installation.
2 changes: 1 addition & 1 deletion docs/reference/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ OpenShell intercepts them and routes to the configured provider:
Agent (sandbox) ──▶ OpenShell gateway ──▶ NVIDIA Endpoint (build.nvidia.com)
```

Refer to [Inference Profiles](../reference/inference-profiles.md) for provider configuration details.
Refer to [Inference Options](../inference/inference-options.md) for provider configuration details.

## Host-Side State and Config

Expand Down
Loading
Loading