Overview
WebChat uses Server-Sent Events (SSE) for real-time streaming responses. Sessions are managed server-side with configurable timeouts.- Streaming responses in real time
- Anonymous access optional
- Rate limiting per IP
- Session-based (30 min timeout by default)
- No JavaScript framework dependency
Setup
WebChat is enabled automatically when profClaw starts. No configuration required.Environment Variables
Allow unauthenticated sessions. Defaults to
false. Set to true for open access.Maximum concurrent sessions per IP address. Defaults to
5.Session expiry in milliseconds. Defaults to
1800000 (30 minutes).Configuration Example
- .env
- settings.yml
Embedding the Widget
You can embed the WebChat widget in your own web application:API Endpoints
WebChat exposes these HTTP endpoints:| Endpoint | Method | Description |
|---|---|---|
/chat/sessions | POST | Create a new session |
/chat/sessions/:id/stream | GET | SSE stream for a session |
/chat/sessions/:id/message | POST | Send a message |
/chat/sessions/:id | DELETE | End a session |
Capabilities
| Feature | Supported |
|---|---|
| Direct messages | Yes |
| Streaming responses | Yes |
| Anonymous access | Configurable |
| File upload | No |
| Slash commands | No |
| Rate limiting | Yes (per IP) |
| Session management | Yes |
Notes
- WebChat sessions auto-expire after inactivity to free server resources.
- Sessions run cleanup every 5 minutes.
- The SSE stream format is compatible with standard
EventSourceAPI. - WebChat is always available on port
3000(configurable viaPORT).
Related
- Chat Providers Overview - Compare all 27 supported channels
- Chat API - Build a custom UI using the REST API and SSE streaming
- Getting Started - Access WebChat on your first run
- profclaw serve - Start the server that powers WebChat