A self-contained chat widget that bundles a FastAPI backend and a Vite-built frontend into a single Docker container. Drop it onto any server, point a script tag at it, and you get either a floating chatbot (Intercom-style) or an inline embed - no Vercel account, no Node toolchain in production. Source: github.com/Vaquill-AI/integrations/widget.Documentation Index
Fetch the complete documentation index at: https://vaquill.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
If you only need a US-only marketing-site widget and prefer Vercel over Docker, the leaner Embedded Chat Widget is a better fit. Pick this one when you want self-hosting, a floating button, or a configurable jurisdiction.
What you get
- One container: FastAPI backend serves both the JSON API and the built frontend
- Two embed modes: floating chatbot (bottom-right bubble) or inline
<div> - Single script tag install on the host site - no iframe required
- Configurable RAG mode, widget title, host port, and CORS origins
- Structured legal source rendering: case name, citation, court, excerpt, PDF link
- Health endpoint for Docker / Kubernetes probes
Prerequisites
For Docker deployment:- Docker 20.10+ and Docker Compose (download)
- A Vaquill API key (
vq_key_...) from app.vaquill.ai/settings/api
- Python 3.10+
- Node.js 18+ and Yarn (
npm install -g yarn) - A Vaquill API key
Quickstart
Open the widget
Visit http://localhost:8000 and ask a test question.
Local development (without Docker)
Run backend and frontend in separate terminals.http://localhost:5173 with hot reload.
Configuration
All configuration is via the.env file:
| Variable | Required | Default | Description |
|---|---|---|---|
VAQUILL_API_KEY | Yes | - | Your Vaquill API key (vq_key_...) |
VAQUILL_API_URL | No | https://api.vaquill.ai/api/v1 | Vaquill API base URL |
WIDGET_MODE | No | standard | Default RAG mode: standard or deep |
WIDGET_TITLE | No | Vaquill Legal AI | Title shown in the chat header |
HOST_PORT | No | 8000 | Host port the container is exposed on |
ALLOWED_ORIGINS | No | * | CORS origins (comma-separated, or *) |
.env:
Embedding
Option 1 - Floating chatbot (Intercom-style)
Add one script tag before</body> on the host site:
| Attribute | Default | Description |
|---|---|---|
data-api-url | http://localhost:8000 | Widget backend URL |
data-primary-color | #1a56db | Brand accent colour |
data-button-size | 60px | Floating button diameter |
data-chat-width | 400px | Panel width on desktop |
data-chat-height | 600px | Panel height |
Option 2 - Inline embed
Platform recipes
examples/ folder in the repo has full working test pages for both embed modes.
Deployment
Docker Compose (recommended)
Behind an Nginx reverse proxy
SSL with Let’s Encrypt
API endpoints
The backend exposes:| Endpoint | Method | Description |
|---|---|---|
/api/chat | POST | Send a message, get an answer + sources |
/api/widget/info | GET | Returns widget display configuration (title, suggested questions) |
/health | GET | Returns {"status": "ok"} for Docker health checks |
/api/chat request:
Troubleshooting
Widget not loading- Run
docker-compose psto verify the container is up. - Check
HOST_PORTin.envmatches the port you are visiting. - Tail logs with
docker-compose logs -f.
- The
data-api-urlin the embed script must match the widget backend URL exactly (including scheme). - For testing, set
ALLOWED_ORIGINS=*and restart the container. - In production, set
ALLOWED_ORIGINSto a comma-separated list of host-site origins.
- Try a more specific legal query (cite a statute or doctrine by name).
- Verify the API key at app.vaquill.ai/settings/api.
- Ensure Docker Desktop’s Rosetta / ARM support is enabled.
- Check available disk space with
df -h.
- Test connectivity from the container:
docker-compose exec backend curl https://api.vaquill.ai/api/v1/health. - Verify
VAQUILL_API_KEYandVAQUILL_API_URLare correct.
Related
Embedded Chat Widget
Leaner Next.js variant pinned to the US.
Widget Pro
Multi-thread sidebar, voice mode, gamification.
Ask API
The endpoint this widget proxies.
GitHub
Source code and issue tracker.

