Skip to main content
WebChat is profClaw’s built-in browser interface. It requires no third-party accounts or webhooks - just start profClaw and open a browser.

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.
profclaw serve
# Open http://localhost:3000 in your browser

Environment Variables

WEBCHAT_ALLOW_ANONYMOUS
boolean
Allow unauthenticated sessions. Defaults to false. Set to true for open access.
WEBCHAT_MAX_SESSIONS_PER_IP
number
Maximum concurrent sessions per IP address. Defaults to 5.
WEBCHAT_SESSION_TIMEOUT_MS
number
Session expiry in milliseconds. Defaults to 1800000 (30 minutes).

Configuration Example

WEBCHAT_ALLOW_ANONYMOUS=false
WEBCHAT_MAX_SESSIONS_PER_IP=5
WEBCHAT_SESSION_TIMEOUT_MS=1800000

Embedding the Widget

You can embed the WebChat widget in your own web application:
<!-- Add to your HTML -->
<script src="https://profclaw.yourdomain.com/widget.js"></script>
<profclaw-chat
  server="https://profclaw.yourdomain.com"
  title="AI Assistant"
  theme="dark"
></profclaw-chat>

API Endpoints

WebChat exposes these HTTP endpoints:
EndpointMethodDescription
/chat/sessionsPOSTCreate a new session
/chat/sessions/:id/streamGETSSE stream for a session
/chat/sessions/:id/messagePOSTSend a message
/chat/sessions/:idDELETEEnd a session

Capabilities

FeatureSupported
Direct messagesYes
Streaming responsesYes
Anonymous accessConfigurable
File uploadNo
Slash commandsNo
Rate limitingYes (per IP)
Session managementYes

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 EventSource API.
  • WebChat is always available on port 3000 (configurable via PORT).