Cluster Chat
A self-hosted, multi-agent web chat application built with PHP, SQLite, and vanilla JS. Designed for homelab setups where models and services are spread across multiple hosts — Ollama instances, Whisper servers, Piper TTS, and anything OpenAI-compatible can all be wired together into agents you can talk to from a single interface.
Features
- Multi-model, multi-host — each model has its own host URL, so chat, TTS, and transcription can all live on different machines
- Agents — compose a chat model, a Whisper transcription model, and a Piper TTS voice into a single named agent with an optional system prompt
- Voice calls — full hands-free voice call mode: VAD detects speech, Whisper transcribes it, the agent responds, Piper speaks the reply
- Voice memos — record and auto-send a transcribed message without leaving the keyboard
- File & image uploads — attach files and images to messages, with vision model support
- Chat history — persistent SQLite storage, collapsible sidebar, resumable conversations
- Streaming — SSE token streaming for all chat models including thinking models (DeepSeek-R1)
Stack
- Backend: PHP 8.3 + Apache
- Database: SQLite
- Frontend: Vanilla JS + CSS
- TTS: Piper via Wyoming TCP protocol
- Transcription: Whisper (OpenAI-compatible or onerahmet/openai-whisper-asr-webservice)
- Chat: Ollama, OpenAI-compatible, or any streaming SSE API
- Deployment: Docker Swarm, Traefik reverse proxy, step-ca TLS
Pages
/— main chat interface with agent/chat selector and voice controls/models.php— add, edit, and delete model/host configurations/agents.php— compose agents from available models
Media





Notes/To-do
- The vision learning part is completely untested.