Chat Widget
Embed a real-time chat interface powered by your agents directly into any website. Supports streaming responses and customizable styling.
What is the Chat Widget?
The Chat Widget is an embeddable UI component that connects directly to your Fluxgate agent. Visitors to your website can chat with your AI agent in real-time.
Embed on Your Website
Embed Chat Widgethtml
<!-- Add this script to your HTML -->
<script src="https://your-acp-domain.com/widget.js"></script>
<script>
ACPChat.init({
agentId: 'YOUR_AGENT_ID',
apiKey: 'YOUR_PUBLIC_API_KEY',
theme: 'light',
position: 'bottom-right',
welcomeMessage: 'Hi! How can I help you today?'
});
</script>Chat via API
Chat APIbash
# Send a chat message
curl -X POST http://localhost:8000/api/v1/chat/AGENT_ID/message \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"session_id": "session_123",
"message": "What are your business hours?",
"stream": true
}'Streaming Support
Set stream: true for real-time token-by-token streaming. Great for a responsive chat experience.