Skip to content

merway7/agentforge-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

AgentForge Chat Widget

A beautiful, embeddable AI chat widget for any website. Zero dependencies. One script tag.

Live Demo — try the widget on our landing page.

Features

  • One script tag — drop it on any site, it just works
  • Zero dependencies — no React, no jQuery, nothing. Pure vanilla JS
  • Dark/light mode — auto-detects system preference + manual toggle
  • SSE streaming — real-time character-by-character responses
  • Markdown — bold, italic, code blocks, links, lists
  • Mobile responsive — full-screen on small viewports
  • Persistent — conversations survive page refresh via localStorage
  • Customizable — colors, position, title, welcome message via data attributes
  • Lightweight — ~15KB unminified

Quick Start

Add this to your HTML:

<script src="https://your-server.com/widget.js" data-server="https://your-server.com" data-color="#6366f1" data-title="Support" data-welcome="Hi! How can I help?" ></script>

Configuration

Attribute Default Description
data-server "" Your backend server URL
data-color #6366f1 Primary color (buttons, header, user bubbles)
data-position bottom-right Widget position (bottom-right or bottom-left)
data-title Support Chat window header title
data-welcome Hi! How can I help you today? First message shown to users
data-sound true Play sound on new messages

What It Looks Like

The widget appears as a floating chat bubble. Click to expand into a full chat window with:

  • User/bot message bubbles with different styling
  • Typing indicator (animated dots)
  • Auto-growing text input
  • Relative timestamps ("just now", "2m ago")
  • Smooth open/close animations

Backend

This widget connects to any backend that accepts:

POST /api/chat Content-Type: application/json { "message": "user's message", "conversationId": "uuid" } 

And returns SSE (Server-Sent Events) with:

data: {"type":"start","conversationId":"uuid"} data: {"type":"content","text":"token"} data: {"type":"done"} 

Need a complete backend?

The SupportAgent Kit ($49) includes:

  • Express.js server with Claude API integration
  • Knowledge base system (feed it your docs)
  • Human handoff detection
  • Analytics dashboard
  • Deployment guides (Vercel, Railway, Docker)
  • Full documentation

One-time purchase. Own the code forever.

License

MIT — use it however you want.

About

zero-dependency embeddable ai chat widget. one script tag. dark/light mode. sse streaming

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors