Skip to main content

Beautiful web UI for GPT-4 multi-agent chat with specialized assistants

Workflow preview

Workflow preview
100%
Beautiful web UI for GPT-4 multi-agent chat with specialized assistants preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

n8n Graphical Input Template AI Agent Interface A beautiful, ready to use HTML interface for n8n workflows that allows your users to interact with AI agents through a clean web UI. No frontend skil...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.respondtowebhook, n8n-nodes-base.stickynote, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Hugo.

Original n8n.io source

1.1 Workflow description

Title
Beautiful web UI for GPT-4 multi-agent chat with specialized assistants
Workflow name
Beautiful web UI for GPT-4 multi-agent chat with specialized assistants

n8n Graphical Input Template - AI Agent Interface

A beautiful, ready-to-use HTML interface for n8n workflows that allows your users to interact with AI agents through a clean web UI. No frontend skills required!

🎯 Why Use This Template?

  • No Frontend Skills Required: Get a professional interface without writing React, Vue, or complex JavaScript
  • Real-Time AI Responses: Display AI responses directly in the interface with loading animations
  • User-Friendly: Your clients get a beautiful UI instead of dealing with APIs or command-line tools
  • Plug & Play: Just paste the code in an n8n Code node and connect your AI agents
  • Fully Customizable: Easy to modify colors, add more agents, or change the layout
  • Dark/Light Mode: Built-in theme toggle with localStorage persistence

πŸš€ When to Use This?

Perfect for:

  • AI Agent Interactions: Let users chat with different specialized AI agents (Database, Web Search, RAG)
  • Customer Support: Route customer questions to appropriate AI assistants
  • Data Collection: Gather information from clients with instant AI-powered responses
  • Customer Portals: Create simple interfaces for customers to interact with your AI automations
  • Internal Tools: Build quick admin panels with AI assistance

πŸ“¦ What's Included?

  • βœ… Text Input Area: Large textarea for user messages
  • βœ… Send Button: Main action button with smooth animations
  • βœ… 4 Specialized Agent Buttons: Pre-configured for General, Database, Web, and RAG agents
  • βœ… AI Response Display: Beautiful response area with agent badges and loading states
  • βœ… Project Guide Modal: Built-in documentation for your users
  • βœ… Theme Toggle: Dark/Light mode with localStorage persistence
  • βœ… Responsive Design: Works perfectly on desktop, tablet, and mobile
  • βœ… Font Awesome Icons: Beautiful icons throughout the interface
  • βœ… Error Handling: Graceful error messages if something goes wrong

πŸ› οΈ How to Use

Part 1: Display the Interface

Create a 3-node workflow to show the UI:

Webhook (GET) β†’ Code Node β†’ Respond to Webhook

Configuration:

  1. Webhook Node (GET):

    • Method: GET
    • Path: /your-interface (e.g., /ai-chat)
    • Authentication: Optional
  2. Code Node:

    • Copy the entire content of main.js
    • Paste it into the Code field
  3. Respond to Webhook:

    • Respond With: First incoming item
    • Response Data Source: Binary
    • Binary Property: data

Part 2: Process AI Requests

Create a separate workflow to handle AI processing:

Webhook (POST) β†’ Switch β†’ AI Agents β†’ Code Node β†’ Respond to Webhook

Configuration:

  1. Webhook Node (POST):

    • Method: POST
    • Path: /webhook-endpoint
    • Response Mode: "Respond to Webhook"
  2. Switch Node - Route by agent type:

    • Rule 1: {{ $json.body.agent_type }} equals general
    • Rule 2: {{ $json.body.agent_type }} equals database
    • Rule 3: {{ $json.body.agent_type }} equals web
    • Rule 4: {{ $json.body.agent_type }} equals rag
  3. AI Agent Nodes (4 nodes, one per agent type):

    • Connect one AI Agent to each Switch output
    • Configure with OpenAI, Anthropic, or local LLM
    • Add tools, memory, system prompts as needed
  4. Code Node - Format the response:

const webhookData = $('Webhook').first().json.body;
const aiResponse = $input.first().json;

return [{
  json: {
    response: aiResponse.output || aiResponse.text || aiResponse.response,
    agent_type: webhookData.agent_type,
    user_message: webhookData.message,
    timestamp: new Date().toISOString()
  }
}];
  1. Respond to Webhook - Send back the formatted response

πŸ”§ What to Update

In main.js

Line 847 - Update webhook URL to match your n8n path:

const WEBHOOK_URL = '/webhook/webhook-endpoint';

Line 20 - Customize project name:

const projectName = "AI Assistant Hub";

Lines 34-56 - Change colors (optional):

:root {
  --primary: #6366f1;        /* Main accent color */
  --primary-hover: #4f46e5;  /* Hover state */
  --background: #ffffff;     /* Background */
}

πŸ“Š How It Works

User visits /your-interface
    ↓
Sees the chat interface
    ↓
Types message + clicks agent button
    ↓
POST to /webhook/webhook-endpoint
{
  "message": "Find users in database",
  "agent_type": "database",
  "timestamp": "2025-10-19T..."
}
    ↓
Switch routes to Database AI Agent
    ↓
AI Agent processes with tools/memory
    ↓
Code Node formats response
    ↓
Returns { "response": "Found 10 users..." }
    ↓
Interface displays response with badge + animation

🎨 Customization Guide

Add More Agents

Copy an agent card (lines ~700-730) and modify:

<div>
  <div>
    <i></i>
  </div>
  <div>Custom AI Agent</div>
  <div>
    Specialized in your custom task.
  </div>
</div>

Then add CSS for the new agent type:

.agent-card.custom-agent::before { background: #f59e0b; }
.agent-card.custom-agent:hover { border-color: #f59e0b; }
.agent-icon.custom-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.response-agent-badge.custom-badge {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

And update the Switch node to handle the new agent type!

Modify Text Content

  • Modal Guide: Lines ~754-810 - Update help text
  • Placeholder: Line ~689 - Change textarea placeholder
  • Subtitles: Lines ~677, ~693 - Modify section descriptions

Change Agent Descriptions

Lines ~705, ~717, ~729 - Update the description text for each agent.

πŸ“± Built-in Features

  • Enter to Send: Press Enter to send (Shift+Enter for new line)
  • Escape to Close: Press Esc to close modals
  • Loading State: Animated spinner while AI processes
  • Agent Badges: Color-coded badges show which agent responded
  • Clear Button: Easily clear responses to start fresh
  • Theme Persistence: Theme choice saved in browser
  • Smooth Animations: Professional transitions and hover effects
  • Error Handling: User-friendly error messages

πŸ’‘ Example Workflow Ideas

Customer Support Bot

  • General Agent: Answers common questions
  • Database Agent: Looks up order status, account info
  • Web Agent: Searches knowledge base articles
  • RAG Agent: Searches company documentation

Data Analysis Tool

  • General Agent: Explains data concepts
  • Database Agent: Runs SQL queries on your data
  • Web Agent: Fetches external data sources
  • RAG Agent: Searches analysis reports

Internal Admin Panel

  • General Agent: General assistance
  • Database Agent: User management queries
  • Web Agent: Check external integrations
  • RAG Agent: Search internal docs/wikis

πŸ› Troubleshooting

Response not displaying?

  • Check that Code Node after AI Agent formats response with response field
  • Verify webhook URL in main.js matches your n8n webhook path
  • Check browser console for JavaScript errors

AI Agent not responding?

  • Ensure Switch node routes match agent types: general, database, web, rag
  • Verify AI Agent nodes are properly configured with API keys
  • Check n8n execution logs for errors

Styling issues?

  • Clear browser cache
  • Check that Font Awesome CDN is loading
  • Verify CSS variables are properly defined

πŸ“ Technical Details

  • Framework: Pure HTML/CSS/JavaScript (no dependencies!)
  • Icons: Font Awesome 6.4.0
  • Browser Support: All modern browsers (Chrome, Firefox, Safari, Edge)
  • Mobile: Fully responsive with touch support
  • File Size: 1050 lines (35KB minified)

🀝 Contributing & Support

This template is designed to be simple and self-explanatory. The code structure:

  1. Lines 1-23: Configuration and setup
  2. Lines 24-640: CSS styles
  3. Lines 641-751: HTML structure
  4. Lines 752-1048: JavaScript functions

Feel free to modify and adapt to your needs!

πŸ“ License

Free to use and modify for your n8n workflows. No attribution required.


1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 2 - Code in JavaScript

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Respond to Webhook

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Webhook1

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 8 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 9 - AI Agent - General

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 10 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 11 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 12 - OpenAI Chat Model2

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 13 - OpenAI Chat Model3

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 14 - Respond to Webhook1

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 15 - Respond to Webhook2

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 16 - Respond to Webhook3

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 17 - Respond to Webhook4

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 18 - AI Agent Database

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 19 - AI Agent - Web

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 20 - AI Agent - Rag

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 21 - Format Response - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - Format Response - Code1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 23 - Format Response - Code2

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 24 - Format Response - Code3

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

3. Summary Table

Workflow Beautiful web UI for GPT-4 multi-agent chat with specialized assistants
Complexity advanced
Nodes 24
Categories Support Chatbot, AI Chatbot
Author Hugo
Published 19 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9901/9901.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Beautiful web UI for GPT-4 multi-agent chat with specialized assistants do?

n8n Graphical Input Template AI Agent Interface A beautiful, ready to use HTML interface for n8n workflows that allows your users to interact with AI agents through a clean web UI. No frontend skil...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.