Skip to content

Commit 7f1872e

Browse files
authored
Update UI Submodule and Reference Docs (#939)
This PR standardizes UI documentation across the repository by updating installation commands to use npm ci for reproducible builds, adding prominent WebSocket requirement notices for human-in-the-loop workflows (OAuth, interactive prompts), and consolidating all UI setup references to point to the comprehensive launching-ui.md guide. The changes improve the Settings Options documentation with clearer structure matching the current UI implementation and enhance examples/UI/README.md with configuration examples and troubleshooting sections. These updates provide a single source of truth for UI configuration and help users avoid common issues by clearly explaining when WebSocket mode is required versus HTTP requests. ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. ## Summary by CodeRabbit - Documentation - Revamped "Launching the UI" guide: modernized UI features, clearer prerequisites, step-by-step startup, expanded Appearance/API/WebSocket configuration, and detailed HTTP vs streaming endpoint guidance. - Emphasized WebSocket requirement for human-in-the-loop, OAuth, and interactive workflows; updated multiple READMEs and workflow docs for consistency. - Chores - Updated UI submodule to a newer revision. Authors: - Eric Evans II (https://github.com/ericevans-nv) Approvers: - Will Killian (https://github.com/willkill07) URL: #939
1 parent 6461d86 commit 7f1872e

File tree

12 files changed

+100
-46
lines changed

12 files changed

+100
-46
lines changed
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

docs/source/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Adding a Telemetry Exporter <./extend/telemetry-exporters.md>
131131
API Authentication <./reference/api-authentication.md>
132132
Interactive Models <./reference/interactive-models.md>
133133
API Server Endpoints <./reference/api-server-endpoints.md>
134-
Websockets <./reference/websockets.md>
134+
WebSockets <./reference/websockets.md>
135135
Command Line Interface (CLI) <./reference/cli.md>
136136
Cursor Rules Reference <./reference/cursor-rules-reference.md>
137137
Evaluation <./reference/evaluate.md>

docs/source/quick-start/launching-ui.md

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,54 @@ limitations under the License.
1616
-->
1717

1818
# Launching the NVIDIA NeMo Agent Toolkit API Server and User Interface
19+
1920
NVIDIA NeMo Agent toolkit provides a user interface for interacting with your running workflow. This guide walks you through starting the API server and launching the web-based user interface to interact with your workflows.
2021

2122
## User Interface Features
22-
- Chat history
23-
- Interact with a workflow via the HTTP API
24-
- Interact with a workflow via a WebSocket
25-
- Enable or disable a workflow's intermediate steps
26-
- Expand all workflow intermediate steps by default
27-
- Override intermediate steps with the same ID
23+
24+
- Modern and responsive user interface
25+
- Real-time streaming responses
26+
- Human-in-the-loop workflow support
27+
- Chat history and conversation management
28+
- Light and Dark theme support
29+
- WebSocket and HTTP API integration
30+
- Intermediate steps visualization
31+
- Docker deployment support
2832

2933
## Walk-through
34+
3035
This walk-through guides you through the steps to set up and configure the NeMo Agent toolkit user interface.
3136

3237
### Prerequisites
38+
3339
Before starting, ensure you have:
40+
3441
- NeMo Agent toolkit installed and configured
3542
- Set up the simple calculator workflow by following the instructions in `examples/getting_started/simple_calculator/README.md`
3643
- Node.js v18+ installed (required for the web interface)
3744

38-
3945
The NeMo Agent toolkit UI is located in a Git submodule at `external/nat-ui`. Ensure you have checked out all of the Git submodules by running the following:
46+
4047
```bash
4148
git submodule update --init --recursive
4249
```
4350

4451
### Start the NeMo Agent Toolkit Server
52+
4553
You can start the NeMo Agent toolkit server using the `nat serve` command with the appropriate configuration file.
4654

4755
```bash
4856
nat serve --config_file=examples/getting_started/simple_calculator/configs/config.yml
4957
```
58+
5059
Running this command will produce the expected output as shown below (truncated for brevity):
60+
5161
```bash
5262
INFO: Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
5363
```
5464

5565
### Verify the NeMo Agent Toolkit Server is Running
66+
5667
After the server is running, you can make HTTP requests to interact with the workflow. This step confirms that the server is properly configured and can process requests.
5768

5869
```bash
@@ -66,47 +77,76 @@ curl --request POST \
6677
```
6778

6879
Running this command will produce the following expected output:
69-
> **Note:** The response depends on the current time of day that the command is run.
80+
:::note
81+
The response depends on the current time of day that the command is run.
82+
:::
7083
```bash
7184
{
7285
"value": "No, 8 is less than the current hour of the day (4)."
7386
}
7487
```
7588

7689
### Launch the NeMo Agent Toolkit User Interface
90+
7791
After the NeMo Agent toolkit server starts, launch the web user interface. Launching the UI requires that Node.js v18+ is installed. Instructions for downloading and installing Node.js can be found in the official [Node.js documentation](https://nodejs.org/en/download).
7892

7993
For comprehensive information about the NeMo Agent Toolkit UI, including setup instructions, configuration options, and UI components documentation, see:
94+
8095
- [NeMo Agent Toolkit UI README](https://github.com/NVIDIA/NeMo-Agent-Toolkit-UI/blob/main/README.md) - Complete UI documentation and setup guide
8196
- [UI Components Documentation](https://github.com/NVIDIA/NeMo-Agent-Toolkit-UI/tree/main/docs/ui) - Detailed information about components, features, and interface elements
8297

98+
#### Local Development
99+
83100
```bash
84101
cd external/nat-ui
85-
npm install
102+
npm ci
86103
npm run dev
87104
```
105+
88106
After the web development server starts, open a web browser and navigate to [`http://localhost:3000/`](http://localhost:3000/).
89107
Port `3001` is an alternative port if port `3000` (default) is in use.
90108

91109
![NeMo Agent toolkit Web User Interface](../_static/ui_home_page.png)
92110

111+
:::important
112+
Workflows requiring human input or interaction (such as human-in-the-loop workflows, OAuth authentication, or interactive prompts) must use WebSocket connections. HTTP requests are the default method of communication, but human-in-the-loop functionality is not supported through HTTP. Ensure that `WebSocket` mode is enabled in the UI by navigating to the top-right corner and selecting the `WebSocket` option in the arrow pop-out.
113+
:::
114+
93115
### Connect the User Interface to the NeMo Agent Toolkit Server Using HTTP API
116+
94117
Configure the settings by selecting the *Settings* icon located on the bottom left corner of the home page.
95118

96119
![NeMo Agent toolkit Web UI Settings](../_static/ui_generate_example_settings.png)
97120

98121
#### Settings Options
99-
**Note:** It's recommended to select `/chat/stream` for intermediate results streaming.
100-
- `Theme`: Light or Dark Theme.
101-
- `HTTP URL for Chat Completion`: REST API enpoint.
102-
- /generate
103-
- /generate/stream
104-
- /chat
105-
- /chat/stream
106-
- `WebSocket URL for Completion`: WebSocket URL to connect to running NeMo Agent toolkit server.
107-
- `WebSocket Schema`: Workflow schema type over WebSocket connection.
122+
123+
**Appearance:**
124+
125+
- `Theme`: Switch between Light and Dark mode
126+
127+
**API Configuration:**
128+
129+
- `HTTP Endpoint`: Select API endpoint type:
130+
- **Chat Completions — Streaming** - Real-time OpenAI Chat Completions compatible API endpoint with streaming responses (recommended for intermediate results)
131+
- **Chat Completions — Non-Streaming** - Standard OpenAI Chat Completions compatible API endpoint
132+
- **Generate — Streaming** - Text generation with streaming
133+
- **Generate — Non-Streaming** - Standard text generation
134+
- `Optional Generation Parameters`: OpenAI Chat Completions compatible JSON parameters that can be added to the request body (available for chat endpoints)
135+
136+
**WebSocket Configuration:**
137+
138+
- `WebSocket Schema`: Select schema for real-time connections:
139+
- **Chat Completions — Streaming** - Streaming chat over WebSocket (recommended for intermediate results)
140+
- **Chat Completions — Non-Streaming** - Non-streaming chat over WebSocket
141+
- **Generate — Streaming** - Streaming generation over WebSocket
142+
- **Generate — Non-Streaming** - Non-streaming generation over WebSocket
143+
144+
:::note
145+
For intermediate results streaming, use **Chat Completions — Streaming** (`/chat/stream`) or **Generate — Streaming** (`/generate/stream`).
146+
:::
108147

109148
### Simple Calculator Example Conversation
149+
110150
Interact with the chat interface by prompting the Agent with the
111151
message: `Is 4 + 4 greater than the current hour of the day?`
112152

docs/source/workflows/mcp/mcp-auth.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,12 @@ At this point, a consent window is displayed to the user. The user must authoriz
152152
Subsequent tool calls can be disabled for the default user ID by setting `allow_default_user_id_for_tool_calls` to `false` in the authentication configuration. This is recommended for multi-user workflows to avoid accidental tool calls by unauthorized users.
153153

154154
3. **Start the UI**:
155-
- Start the UI by following the instructions in the [User Interface](../../quick-start/launching-ui.md) documentation.
156-
- Connect to the UI at `http://localhost:3000`
157-
- Ensure that `WebSocket` mode is enabled by navigating to the top-right corner and selecting the `WebSocket` option in the arrow pop-out.
155+
- Start the UI by following the instructions in the [Launching the UI](../../quick-start/launching-ui.md) documentation.
156+
- Connect to the UI at http://localhost:3000
157+
158+
:::important
159+
Ensure that `WebSocket` mode is enabled by navigating to the top-right corner and selecting the `WebSocket` option in the arrow pop-out. WebSocket connections are required for OAuth authentication workflows.
160+
:::
158161

159162
4. **Send the input to the workflow via the UI**:
160163
```text

examples/MCP/simple_auth_mcp/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ nat serve --config_file examples/MCP/simple_auth_mcp/configs/config-mcp-auth-jir
7272
```
7373

7474
2. **Start the UI**:
75-
Start UI and connect to the URL `http://localhost:3000`. Ensure that `Websocket` mode is enabled by navigating to the top-right corner and selecting the `Websocket` option in the arrow pop-out.
75+
76+
Start the UI by following the instructions in the [Launching the UI](../../../docs/source/quick-start/launching-ui.md) guide. Connect to the URL http://localhost:3000.
77+
78+
> [!IMPORTANT]
79+
> Ensure that `WebSocket` mode is enabled by navigating to the top-right corner and selecting the `WebSocket` option in the arrow pop-out. WebSocket connections are required for OAuth authentication workflows.
7680
7781
3. **Send the input to the workflow via the UI**:
7882
```text

examples/UI/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ This example demonstrates how to integrate and use the web-based user interface
2626
- **Real-Time Streaming:** Shows how to enable intermediate step streaming for enhanced user experience, allowing users to see agent reasoning and tool execution in real-time.
2727
- **UI Customization Options:** Supports theme customization, endpoint configuration, and display options to match different deployment environments and user preferences.
2828
- **Conversation Management:** Includes conversation history, session management, and context preservation across multiple interactions within the same session.
29+
- **Human-in-the-Loop Support:** Interactive prompts and OAuth consent handling for workflows requiring user input or authentication.
2930

3031
## What You'll Learn
3132

3233
- **UI setup and configuration**: Launch and configure the Agent toolkit web interface
3334
- **Interactive workflow management**: Use the UI to interact with agents and view conversation history
3435
- **Connection management**: Configure HTTP and WebSocket connections for different use cases
3536
- **Real-time streaming**: Enable intermediate step streaming for enhanced user experience
36-
- **UI customization**: Customize themes, endpoints, and display options
37+
- **UI customization**: Customize themes, endpoints, and display options through environment variables
3738

3839
## Quick Start
3940

4041
For complete setup and usage instructions, refer to the comprehensive guide: [Launching the UI](../../docs/source/quick-start/launching-ui.md).
42+
43+
> [!IMPORTANT]
44+
> Workflows requiring human input or interaction (such as human-in-the-loop workflows, OAuth authentication, or interactive prompts) must use WebSocket connections. HTTP requests are the default method of communication, but human-in-the-loop functionality is not supported through HTTP. Ensure that `WebSocket` mode is enabled in the UI by navigating to the top-right corner and selecting the `WebSocket` option in the arrow pop-out.

examples/advanced_agents/profiler_agent/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ The profiler agent is a tool that allows you to analyze the performance of NeMo
2121

2222
## Table of Contents
2323

24-
- [Key Features](#key-features)
25-
- [Installation and Setup](#installation-and-setup)
26-
- [Install this Workflow](#install-this-workflow)
27-
- [Set Up API Keys](#set-up-api-keys)
28-
- [Run the Workflow](#run-the-workflow)
29-
- [Features](#features)
24+
- [NeMo Agent Toolkit Profiler Agent](#nemo-agent-toolkit-profiler-agent)
25+
- [Table of Contents](#table-of-contents)
26+
- [Key Features](#key-features)
27+
- [Installation and Setup](#installation-and-setup)
28+
- [Install this Workflow:](#install-this-workflow)
29+
- [Set Up API Keys](#set-up-api-keys)
30+
- [Run the Workflow](#run-the-workflow)
31+
- [Features](#features)
3032

3133
## Key Features
3234

@@ -81,7 +83,7 @@ export NVIDIA_API_KEY=<YOUR_API_KEY>
8183
nat serve --config_file=examples/advanced_agents/profiler_agent/configs/config.yml
8284
```
8385

84-
4. Launch the NeMo Agent Toolkit User Interface by using the instructions in the [Launching the User Interface](../../../docs/source/quick-start/launching-ui.md#launch-the-nemo-agent-toolkit-user-interface) guide.
86+
4. Launch the NeMo Agent Toolkit User Interface by using the instructions in the [Launching the UI](../../../docs/source/quick-start/launching-ui.md) guide.
8587

8688
5. Query the agent with natural language via the UI:
8789
```

examples/front_ends/simple_auth/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ Browse to **`http://localhost:5001/`** – you should see the demo home page. Si
119119

120120
## Deploy the NeMo Agent Toolkit UI
121121

122-
Follow the instructions at the GitHub repository to deploy the [NeMo Agent Toolkit UI](https://github.com/NVIDIA/NeMo-Agent-Toolkit-UI)
123-
to deploy the UI that works with the agent in this example. Configure it according to the instructions in the README.
122+
Follow the instructions in the [Launching the UI](../../../docs/source/quick-start/launching-ui.md) guide to set up and launch the NeMo Agent Toolkit UI.
124123

125124
## Update Your Environment Variables
126125

@@ -144,16 +143,18 @@ handles authentication.
144143

145144
## Query the Agent
146145

147-
Open the NeMo Agent Toolkit UI in your browser at `http://localhost:3000`. Ensure settings are configured correctly to point to your agent's API endpoint at `http://localhost:8000` and
148-
the WebSocket URL at `ws://localhost:8000/websocket`.
146+
Open the NeMo Agent Toolkit UI in your browser at http://localhost:3000.
149147

150-
Close the settings window. In your chat window, ensure that `Websocket` mode is enabled by navigating to the top-right corner and selecting the `Websocket` option in the arrow pop-out.
148+
By default, the UI is configured to connect to your agent's API endpoint at `http://localhost:8000` and the WebSocket URL at `ws://localhost:8000/websocket`. These default values can be changed using environment variables. See the [Launching the UI](../../../docs/source/quick-start/launching-ui.md) guide for environment variable configuration details.
151149

152-
Once you've successfully connected to the websocket, you can start querying the agent. Asking the agent the following query should initiate the demonstrative authentication flow and then return
153-
information about the authenticated user:
150+
> [!IMPORTANT]
151+
> In your chat window, ensure that `WebSocket` mode is enabled by navigating to the top-right corner and selecting the `WebSocket` option in the arrow pop-out. This is required for the OAuth 2.0 authentication flow to work properly.
152+
153+
Once you've successfully connected to the WebSocket, you can start querying the agent. Asking the agent the following query should initiate the demonstrative authentication flow and then return information about the authenticated user:
154154

155155
```text
156156
Who am I logged in as?
157157
```
158158

159-
**Tip**: Remember to enable pop-ups in your browser to allow the OAuth 2.0 provider to open a new window for authentication.
159+
> [!TIP]
160+
> If you encounter errors, verify that WebSocket mode is enabled. HTTP requests are the default method of communication, but human-in-the-loop functionality (including OAuth authentication) is not supported through HTTP.

0 commit comments

Comments
 (0)