dreistein / d-ai
AI for TYPO3: chatbot over your own TYPO3 pages (RAG + CAG, pgvector, Mistral/OpenAI/Gemini/Anthropic). The free community edition of dAi.
Package info
Type:typo3-cms-extension
pkg:composer/dreistein/d-ai
Requires
- php: ^8.2
- fivefilters/readability.php: ^3.1
- guzzlehttp/promises: ^1.5 || ^2.0
- league/commonmark: ^2.4
- symfony/http-client: ^6.4 || ^7.0
- typo3/cms-backend: ^12.4 || ^13.4 || ^14.0
- typo3/cms-core: ^12.4 || ^13.4 || ^14.0
- typo3/cms-extbase: ^12.4 || ^13.4 || ^14.0
- typo3/cms-fluid: ^12.4 || ^13.4 || ^14.0
- typo3/cms-frontend: ^12.4 || ^13.4 || ^14.0
README
An AI chatbot over the content of your own TYPO3 page tree: index pages, answer questions in the frontend — with source references, multilingual, either via RAG (vector search) or CAG (prompt cache).
d_ai is the free community edition of dAi PRO — the full version adds web crawling, file uploads, external data source connectors (Confluence, Notion, Zendesk, Nextcloud, SharePoint, databases and more), assistants (few-shots, goal prompts), function calling, handoff routing, voice chat, figure extraction, user management and more.
Features
- TYPO3 pages as a data source: read and index pages straight from the page tree — no sitemap, no crawl
- LLM configurations: Mistral, OpenAI, Google Gemini and Anthropic (chat and embedding selectable separately per collection)
- RAG + CAG: hybrid retrieval (vector + full text) with automatic CAG routing (the entire knowledge base in the prompt cache), including a classifier
- Multilingual: languages per collection, language-separated bundles, translatable prompts and help texts
- Chatbot content element with streaming (SSE), source references and help text
- Usage overview: token usage and costs per collection
Requirements
- TYPO3 12.4, 13.4 or 14, PHP 8.2+
- PostgreSQL with the
pgvectorextension (for the vector index; the TYPO3 tables may live on MySQL/MariaDB) - An API key of an LLM provider (Mistral, OpenAI, Google Gemini or Anthropic)
Installation
composer require dreistein/d-ai
Configure the PostgreSQL connection and map the extension tables to it, e.g. in
config/system/additional.php (the backend module shows this guide with a live
status check as long as the setup is incomplete):
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['pgvector'] = [ 'driver' => 'pdo_pgsql', 'host' => '127.0.0.1', 'port' => 5432, 'dbname' => 'typo3_dai', 'user' => 'typo3_dai', 'password' => 'your-password', 'charset' => 'utf8', ]; foreach ([ 'tx_dai_domain_model_project', 'tx_dai_llm_config', 'tx_dai_data_source', 'tx_dai_ingest_job', 'tx_dai_domain_model_document', ] as $table) { $GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'][$table] = 'pgvector'; }
The database needs the vector extension enabled once (as superuser):
CREATE EXTENSION vector; — and PHP needs pdo_pgsql.
Activate the extension, run the database comparison, then in the backend module dAi:
- Create a provider with an API key under LLM configurations
- Create a New collection (choose the chat and embedding LLM)
- Configure a “TYPO3 pages” source under Data sources (root page UIDs, depth, language) and synchronise it
- Select documents and click Process (chunking + embedding)
- Insert the content element dAi: Chatbot (AI search) on a page and choose the collection
For background processing, set up the scheduler task dAi: process ingest queue (CLI cron, e.g. every minute).
Languages
The backend and frontend are available in English (source language), German, Dutch, French, Italian, Polish and Ukrainian. The interface follows the backend user’s language and — in the frontend — the language of the page.
License
GPL-2.0-or-later — © Joachim Dreistein Medienentwicklung, Düsseldorf.