Skip to content

The NVIDIA AIQToolkit UI streamlines interacting with AIQToolkit workflows in an easy-to-use web application.

License

Notifications You must be signed in to change notification settings

NVIDIA/NeMo-Agent-Toolkit-UI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

NeMo Agent Toolkit - UI

License NeMo Agent Toolkit

This is the official frontend user interface component for NeMo Agent Toolkit, an open-source library for building AI agents and workflows.

This project builds upon the work of:

Features

  • 🎨 Modern and responsive user interface
  • πŸ”„ Real-time streaming responses
  • 🀝 Human-in-the-loop workflow support
  • πŸŒ™ Light/Dark theme
  • πŸ”Œ WebSocket and HTTP API integration
  • 🐳 Docker support

Getting Started

Prerequisites

Installation

Clone the repository:

git clone [email protected]:NVIDIA/NeMo-Agent-Toolkit-UI.git
cd NeMo-Agent-Toolkit-UI

Install dependencies:

npm ci

Running the Application

Local Development

npm run dev

The application will be available at http://localhost:3000

Docker Deployment

# Build the Docker image
docker build -t nemo-agent-toolkit-ui .

# Run the container with environment variables from .env
# Ensure the .env file is present before running this command.
# Skip --env-file .env if no overrides are needed.
docker run --env-file .env -p 3000:3000 nemo-agent-toolkit-ui

NeMo Agent Toolkit Web User Interface

Configuration

Environment Variables

The application supports configuration via environment variables in a .env file:

Application Configuration:

  • NEXT_PUBLIC_WORKFLOW - Application workflow name displayed in the UI
  • NEXT_PUBLIC_SERVER_URL - Backend server URL for HTTP API requests
  • NEXT_PUBLIC_WEBSOCKET_URL - WebSocket server URL for real-time connections
  • NEXT_PUBLIC_WEBSOCKET_PATH - WebSocket endpoint path

Feature Toggles:

  • NEXT_PUBLIC_WEB_SOCKET_DEFAULT_ON - Enable WebSocket mode by default (true/false)
  • NEXT_PUBLIC_CHAT_HISTORY_DEFAULT_ON - Enable chat history persistence by default (true/false)
  • NEXT_PUBLIC_RIGHT_MENU_OPEN - Show right menu panel by default (true/false)
  • NEXT_PUBLIC_ENABLE_INTERMEDIATE_STEPS - Show AI reasoning steps by default (true/false)

Optional Configuration:

  • DEFAULT_MODEL - Default AI model identifier for server-side rendering
  • MAX_FILE_SIZE_STRING - Maximum file upload size for all operations (e.g., '5mb', '10mb', '1gb')
  • NODE_ENV - Environment mode (development/production) affects security settings
  • NEXT_TELEMETRY_DISABLED - Disable Next.js telemetry data collection (1 to disable)

HTTP API Connection

Settings can be configured by selecting the Settings icon located on the bottom left corner of the home page.

NeMo Agent Toolkit Web UI Settings

Settings Options

Appearance:

  • Theme: Switch between Light and Dark mode

API Configuration:

  • HTTP Endpoint: Select API endpoint type:
    • Chat Completions β€” Streaming - Real-time OpenAI Chat Completions compatible API endpoint with streaming responses
    • Chat Completions β€” Non-Streaming - Standard OpenAI Chat Completions compatible API endpoint
    • Generate β€” Streaming - Text generation with streaming
    • Generate β€” Non-Streaming - Standard text generation
  • Optional Generation Parameters: OpenAI Chat Completions compatible JSON parameters that can be added to the request body (available for chat endpoints)

WebSocket Configuration:

  • WebSocket Schema: Select schema for real-time connections:
    • Chat Completions β€” Streaming - Streaming chat over WebSocket
    • Chat Completions β€” Non-Streaming - Non-streaming chat over WebSocket
    • Generate β€” Streaming - Streaming generation over WebSocket
    • Generate β€” Non-Streaming - Non-streaming generation over WebSocket

Note: For intermediate results streaming, use Chat Completions β€” Streaming (/chat/stream) or Generate β€” Streaming (/generate/stream).

Usage Examples

Getting Started Example

Setup and Configuration

  1. Set up NeMo Agent Toolkit following the getting started guide
  2. Start workflow by following the Getting Started Examples
nat serve --config_file=examples/getting_started/simple_calculator/configs/config.yml

Testing the Calculator

Interact with the chat interface by prompting the agent with the message:

Is 4 + 4 greater than the current hour of the day?

NeMo Agent Toolkit Web UI Workflow Result

Human In The Loop (HITL) Example

Setup and Configuration

  1. Set up NeMo Agent Toolkit following the getting started guide
  2. Start workflow by following the HITL Example
nat serve --config_file=examples/HITL/simple_calculator_hitl/configs/config-hitl.yml

Configuring HITL Settings

Enable WebSocket mode in the settings panel for bidirectional real-time communication between the client and server.

NeMo Agent Toolkit Web UI HITL Settings

Example Conversation

  1. Send the following prompt:
Can you process my input and display the result for the given prompt: How are you today?
  1. Enter your response when prompted:

NeMo Agent Toolkit Web UI HITL Prompt

  1. Monitor the result:

NeMo Agent Toolkit Web UI HITL Result

Server Communication

The UI supports both HTTP requests (OpenAI Chat compatible) and WebSocket connections for server communication. For detailed information about WebSocket messaging integration, please refer to the WebSocket Documentation in the NeMo Agent Toolkit documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details. The project includes code from chatbot-ui and chatbot-ollama, which are also MIT licensed.

About

The NVIDIA AIQToolkit UI streamlines interacting with AIQToolkit workflows in an easy-to-use web application.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 9