You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: docs/source/quick-start/launching-ui.md
+58-18Lines changed: 58 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,43 +16,54 @@ limitations under the License.
16
16
-->
17
17
18
18
# Launching the NVIDIA NeMo Agent Toolkit API Server and User Interface
19
+
19
20
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.
20
21
21
22
## 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
28
32
29
33
## Walk-through
34
+
30
35
This walk-through guides you through the steps to set up and configure the NeMo Agent toolkit user interface.
31
36
32
37
### Prerequisites
38
+
33
39
Before starting, ensure you have:
40
+
34
41
- NeMo Agent toolkit installed and configured
35
42
- Set up the simple calculator workflow by following the instructions in `examples/getting_started/simple_calculator/README.md`
36
43
- Node.js v18+ installed (required for the web interface)
37
44
38
-
39
45
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
+
40
47
```bash
41
48
git submodule update --init --recursive
42
49
```
43
50
44
51
### Start the NeMo Agent Toolkit Server
52
+
45
53
You can start the NeMo Agent toolkit server using the `nat serve` command with the appropriate configuration file.
Running this command will produce the expected output as shown below (truncated for brevity):
60
+
51
61
```bash
52
62
INFO: Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
53
63
```
54
64
55
65
### Verify the NeMo Agent Toolkit Server is Running
66
+
56
67
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.
57
68
58
69
```bash
@@ -66,47 +77,76 @@ curl --request POST \
66
77
```
67
78
68
79
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
+
:::
70
83
```bash
71
84
{
72
85
"value": "No, 8 is less than the current hour of the day (4)."
73
86
}
74
87
```
75
88
76
89
### Launch the NeMo Agent Toolkit User Interface
90
+
77
91
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).
78
92
79
93
For comprehensive information about the NeMo Agent Toolkit UI, including setup instructions, configuration options, and UI components documentation, see:
-[UI Components Documentation](https://github.com/NVIDIA/NeMo-Agent-Toolkit-UI/tree/main/docs/ui) - Detailed information about components, features, and interface elements
82
97
98
+
#### Local Development
99
+
83
100
```bash
84
101
cd external/nat-ui
85
-
npm install
102
+
npm ci
86
103
npm run dev
87
104
```
105
+
88
106
After the web development server starts, open a web browser and navigate to [`http://localhost:3000/`](http://localhost:3000/).
89
107
Port `3001` is an alternative port if port `3000` (default) is in use.
90
108
91
109

92
110
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
+
93
115
### Connect the User Interface to the NeMo Agent Toolkit Server Using HTTP API
116
+
94
117
Configure the settings by selecting the *Settings* icon located on the bottom left corner of the home page.
95
118
96
119

97
120
98
121
#### 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
+
:::
108
147
109
148
### Simple Calculator Example Conversation
149
+
110
150
Interact with the chat interface by prompting the Agent with the
111
151
message: `Is 4 + 4 greater than the current hour of the day?`
Copy file name to clipboardExpand all lines: docs/source/workflows/mcp/mcp-auth.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,9 +152,12 @@ At this point, a consent window is displayed to the user. The user must authoriz
152
152
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.
153
153
154
154
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.
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.
Copy file name to clipboardExpand all lines: examples/UI/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,19 @@ This example demonstrates how to integrate and use the web-based user interface
26
26
-**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.
27
27
-**UI Customization Options:** Supports theme customization, endpoint configuration, and display options to match different deployment environments and user preferences.
28
28
-**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.
29
30
30
31
## What You'll Learn
31
32
32
33
-**UI setup and configuration**: Launch and configure the Agent toolkit web interface
33
34
-**Interactive workflow management**: Use the UI to interact with agents and view conversation history
34
35
-**Connection management**: Configure HTTP and WebSocket connections for different use cases
35
36
-**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
37
38
38
39
## Quick Start
39
40
40
41
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.
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.
85
87
86
88
5. Query the agent with natural language via the UI:
Copy file name to clipboardExpand all lines: examples/front_ends/simple_auth/README.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,8 +119,7 @@ Browse to **`http://localhost:5001/`** – you should see the demo home page. Si
119
119
120
120
## Deploy the NeMo Agent Toolkit UI
121
121
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.
124
123
125
124
## Update Your Environment Variables
126
125
@@ -144,16 +143,18 @@ handles authentication.
144
143
145
144
## Query the Agent
146
145
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.
149
147
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.
151
149
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:
154
154
155
155
```text
156
156
Who am I logged in as?
157
157
```
158
158
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