Skip to content

Commit b67e340

Browse files
committed
Updating UI submodule and UI documentation in README files.
Signed-off-by: Eric Evans <[email protected]>
1 parent 2219cc5 commit b67e340

File tree

9 files changed

+84
-42
lines changed

9 files changed

+84
-42
lines changed
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

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

Lines changed: 53 additions & 17 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,72 @@ curl --request POST \
6677
```
6778

6879
Running this command will produce the following expected output:
80+
6981
> **Note:** 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**: 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.
112+
93113
### Connect the User Interface to the NeMo Agent Toolkit Server Using HTTP API
114+
94115
Configure the settings by selecting the *Settings* icon located on the bottom left corner of the home page.
95116

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

98119
#### 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.
120+
121+
**Appearance:**
122+
123+
- `Theme`: Switch between Light and Dark mode
124+
125+
**API Configuration:**
126+
127+
- `HTTP Endpoint`: Select API endpoint type:
128+
- **Chat Completions — Streaming** - Real-time OpenAI Chat Completions compatible API endpoint with streaming responses (recommended for intermediate results)
129+
- **Chat Completions — Non-Streaming** - Standard OpenAI Chat Completions compatible API endpoint
130+
- **Generate — Streaming** - Text generation with streaming
131+
- **Generate — Non-Streaming** - Standard text generation
132+
- `Optional Generation Parameters`: OpenAI Chat Completions compatible JSON parameters that can be added to the request body (available for chat endpoints)
133+
134+
**WebSocket Configuration:**
135+
136+
- `WebSocket Schema`: Select schema for real-time connections:
137+
- **Chat Completions — Streaming** - Streaming chat over WebSocket (recommended for intermediate results)
138+
- **Chat Completions — Non-Streaming** - Non-streaming chat over WebSocket
139+
- **Generate — Streaming** - Streaming generation over WebSocket
140+
- **Generate — Non-Streaming** - Non-streaming generation over WebSocket
141+
142+
**Note:** For intermediate results streaming, use **Chat Completions — Streaming** (`/chat/stream`) or **Generate — Streaming** (`/generate/stream`).
108143

109144
### Simple Calculator Example Conversation
145+
110146
Interact with the chat interface by prompting the Agent with the
111147
message: `Is 4 + 4 greater than the current hour of the day?`
112148

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ 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**: 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.
158159

159160
4. **Send the input to the workflow via the UI**:
160161
```text

examples/MCP/simple_auth_mcp/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ 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**: 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.
7679
7780
3. **Send the input to the workflow via the UI**:
7881
```text

examples/UI/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ 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**: 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: 5 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,14 @@ 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`. 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.
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+
> **Important**: 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.
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+
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:
154151

155152
```text
156153
Who am I logged in as?
157154
```
158155

159-
**Tip**: Remember to enable pop-ups in your browser to allow the OAuth 2.0 provider to open a new window for authentication.
156+
**Tip**: 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)