Download the PHP package fendinger/kirby-visitor-ai-chat without Composer

On this page you can find all versions of the php package fendinger/kirby-visitor-ai-chat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kirby-visitor-ai-chat

Kirby Visitor AI Chat

Kirby Visitor AI Chat

Intelligent site search as a chat widget for Kirby CMS. Content is indexed as embeddings and visitor questions are answered via RAG (Retrieval-Augmented Generation).

Five supported providers: OpenAI, Mistral, Google Gemini, IONOS AI Model Hub, Mittwald AI Hosting — freely configurable for embeddings and chat responses.

Using this plugin incurs costs. All supported providers charge for API usage (embeddings during indexing, chat completions per visitor question). In practice, costs are usually only a few cents per month for small to medium sites with moderate traffic — but this depends on site size, chosen models, and visitor volume. You are solely responsible for usage and billing with your provider. The plugin includes local token/cost tracking (see Cost and token tracking) and configurable rate limits, but does not enforce hard spending caps — set budget alerts and usage limits in your provider's dashboard.

Installation

Composer

Manual

Download and copy this repository to /site/plugins/kirby-visitor-ai-chat.

Configuration

In site/config/config.php:

Getting API keys

You need an API key from at least one provider. Embedding and chat providers can be the same or different.

Paste the key into site/config/config.php as shown above. Make sure config.php is not committed to a public repository.

Initial reindex

Before the widget can answer, the site must be indexed once. In the Panel under Visitor AI Chat (menu entry), click „Run full reindex". Statistics (reachable pages, chunks, last crawl) are shown on the same page.

Alternatively via PHP CLI:

Subsequent content changes are picked up automatically (see Automatic updates).

Embedding the widget

The plugin ships a snippet that renders the chat widget. Include it in your site template (typically site/snippets/footer.php or wherever you want the floating button to appear):

Without this line nothing is rendered on the frontend — the Panel and API still work, but visitors will not see the chat bubble.

Default models

Provider Embeddings Chat
OpenAI text-embedding-3-small gpt-4o-mini
Mistral mistral-embed mistral-small-latest
Gemini text-embedding-004 gemini-1.5-flash
IONOS BAAI/bge-m3 meta-llama/Llama-3.3-70B-Instruct
Mittwald Qwen3-Embedding-8B gpt-oss-120b

Models can be overridden per provider (openai.embeddingModel, openai.chatModel, …).

Switching providers requires a full reindex. Embedding vectors from different providers/models have different dimensions (e.g. OpenAI 1536, IONOS bge-m3 1024, Mittwald Qwen3 4096) and cannot be compared. After changing the embedding provider, run a full reindex from the Panel — otherwise the retriever will silently drop all hits and answers will be empty.

Overriding the system prompt

The default system prompt is suitable for most websites. To adjust tone, structure, length, or formatting rules, set your own prompt via config:

Placeholders:

Without a config override the plugin uses the built-in default, including rules for Markdown links, list formatting, and automatic response language based on the languages enabled in Kirby.

Widget texts and greeting

All visible texts of the frontend widget (title, greeting, placeholder, error messages) come from Kirby's translation system and can be overridden, e.g. in site/languages/en.php:

The widget title can additionally be set via config (overrides the translation):

Theme

The widget ships with a light and a dark theme. Light is the default. Set via config:

License & activation

The plugin is commercial. Each license key is bound to a single production website (one activation per key). Local and development environments behave identically to production — activate a (test-mode) key there to verify the full flow before going live.

Activating a license

  1. Purchase a license at fendinger.lemonsqueezy.com — you receive the key by email.
  2. In the Kirby Panel, open System → Plugins and click Activate now in the row for Visitor AI Chat.
  3. Paste the key and click Activate License. The key is bound to your site's primary domain.

Once activated, the same row shows Licensed and clicking it opens a dialog with license details and a Deactivate license button.

Deployment via config

For automated deployments, you can set the key in site/config/config.php:

Moving to a different website

Open the license dialog in System → Plugins and click Deactivate license before reusing the key on another site. The activation slot is released on the LemonSqueezy side and becomes available again.

Behaviour without a license

The plugin keeps working unconditionally, so a license server outage never breaks your site. The Panel displays a banner reminding you to register.

Indexing strategy

The indexer crawls the site starting from the homepage (BFS over internal <a href> links, optionally seeded by sitemap.xml) and indexes the rendered HTML output of each reachable page. This captures static template text (headings, buttons, labels) that is not stored in content fields.

Per page, the content from <main> (fallback <body>) is extracted; <nav>, <footer>, <script>, <style>, <noscript>, <svg> and <template> are removed. Image metadata (Alt, Caption, Title, Photographer) from each page's Kirby files is appended to the rendered text — even if the template does not output it.

Fragment pages that are not reachable via links are not indexed. Pages with <meta name="robots" content="noindex"> are also ignored. For multi-language sites, each active language is crawled separately.

Escape hatch: forceIndex

For pages that are not linked (e.g. only reachable via newsletter/ads, SPA routing), the plugin field can be embedded:

With the toggle enabled, the page is always indexed — regardless of the crawl result.

Excluding individual pages

Conversely, a page can be explicitly excluded from the index:

Alternatively globally via config (exclude.pages) as a list of page IDs.

On-demand reindex per page

To let editors trigger an immediate reindex of a single page from the Panel (without running a full reindex), embed the button field in the page blueprint:

Clicking the button calls the per-page reindex API and shows a Panel notification on success or failure.

Alternatively (or additionally), the same action is available as a view button in the page header bar (top right, next to Status / Settings). Enable it by adding page.reindex to the page view button list — either globally in site/config/config.php:

…or per page blueprint:

Panel

The plugin registers a menu entry Visitor AI Chat with four tabs:

If no provider is configured or an API key is missing, the Panel shows a setup notice instead of the tabs, with a specific error message and config example.

Cost and token tracking

The plugin logs every embed and chat request locally in site/cache/fendinger.visitor-ai-chat/usage.json:

Costs are calculated from tokens using a static price list (USD per 1M tokens). Defaults for OpenAI, Mistral, and Gemini are included in the plugin. Override in site/config/config.php:

Notes:

Chat logs

The plugin logs by default every visitor request along with answer, sources, tokens, and latency — as a JSONL file per month under site/cache/fendinger.visitor-ai-chat/logs/. Disable in config.php:

When logging is disabled, the Chats tab is hidden in the Panel.

In the Panel, the Chats tab shows:

GDPR notes

Logs contain plain-text questions from visitors. Depending on content these may qualify as personal data:

The plugin stores no IP addresses and no user agent. Only an anonymous session ID from the browser's sessionStorage (lives only while the tab is open).

Automatic updates

Panel changes (page.create/update/delete) trigger incremental reindexing. A page is only reindexed if it was reachable during the last full crawl or if forceIndex is enabled. A full reindex refreshes the reachability list.

Two reindex modes: full vs. delta

The Panel offers two buttons in the Index tab header:

The per-page hook (page.update:after) uses the same hash check — a page edit that doesn't change the rendered output won't trigger an embedding call.

A reindex run reports both counts so you can see the savings:

A provider/model change is auto-detected and forces a full re-embed even if you click Update index (different vector dimensions are not comparable). When in doubt, use the full reindex.

API equivalents:

What gets indexed?

Excluded are <nav>, <footer>, <script>, <style>, <noscript> and <svg>. This keeps navigation and footer out of retrieval across all pages, so they don't dilute results.

API

Internally the Panel uses additional protected routes under /api/visitor-ai-chat/* (chunks, per-page reindex, test-query, conversation fetch, log reset, page exclude, URL index). These are not intended as a public interface.

Storage

Index: site/cache/fendinger.visitor-ai-chat/index.json — portable, can be deleted for a full rebuild.

Security

Requirements

License

Commercial license. See LICENSE for full terms.

One license covers unlimited projects as long as you retain ownership of the code. If you hand a project over to a client, that client needs their own license (same model as Kirby CMS itself).

Author

Jens Fendinger


All versions of kirby-visitor-ai-chat with dependencies

PHP Build Version
Package Version
Requires getkirby/cms Version ^5.0
getkirby/composer-installer Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fendinger/kirby-visitor-ai-chat contains the following files

Loading the files please wait ...