php-chatbot-assistant — Free, Self-Hosted AI Chatbot Platform

php-chatbot-assistant is a free, MIT-licensed platform for self-hosted document Q&A chatbots with configurable retrieval, lead capture, and an embeddable website widget.

Visit Website
php-chatbot-assistant — Free, Self-Hosted AI Chatbot Platform

Introduction

Overview

php-chatbot-assistant is a self-hosted AI chatbot platform built for answering questions from an organization's own documents. It runs on PHP 8.2 or later with PostgreSQL 16 and pgvector, while conversations and operational data remain in the owner's database.

The software is MIT licensed and designed for multi-tenant use. Each chatbot can have separate model settings, instructions, widget styling, and permitted domains.

Key Features

  • Uploads PDF, DOCX, TXT, and Markdown documents through an automated parsing, chunking, embedding, and indexing pipeline.
  • Supports classic vector RAG and PageIndex outline navigation as a per-chatbot retrieval choice.
  • Captures a visitor's name, email, and phone within the conversation, then stores and summarizes the lead.
  • Handles trigger-based quick answers before calling the language model.
  • Includes tenant management, permissions, an audit trail, and configurable chatbot cloning.
  • Provides security controls including Argon2id passwords, magic links, TOTP recovery codes, account lockout, rate limiting, CSRF protection, and rotating sessions.

Retrieval and Website Widget

Vector retrieval embeds document chunks and stores them in pgvector, then finds relevant passages using cosine distance. PageIndex instead creates a hierarchy of headings and sections so the model can select relevant portions of long, structured documents without relying on chunk boundaries.

A generated script embed places the chatbot on a website. The Shadow DOM implementation isolates its styles from the host page, while configurable colors, panel position, light or dark appearance, quick-answer chips, typing indicators, ratings, and resizing support different site experiences.

Pricing and Deployment

The complete software costs $0 and has no subscription, seat, bot, message, revenue, trial, or license-key limit. Users install it on their own server and provide their own OpenAI and LlamaCloud accounts, paying those providers and their chosen host directly.

Optional server installation is offered for a one-time $150 fee. Optional document preparation is quoted separately at a flat or per-document rate; neither service is required to use the full product.