Ai3 Summary 

Extension key

ai3_summary

Package name

wegewerk/ai3_summary

Version

0.9

Language

en

Author

wegewerk GmbH

License

This document is published under the Open Publication License.

Rendered

Fri, 21 Aug 2026 14:33:08 +0000


Ai3 Summary is a TYPO3 extension that adds an AI-powered Page Summary content element. Editors can generate a bullet-point summary of all contentx on the current page with a single click, using the ZAK-AI REST API.

It is part of the Ai3 Suite and requires wegewerk/ai3_core .


Introduction 

Ai3 Summary adds a Page Summary content element to TYPO3. When placed on a page, it provides editors with a one-click button to generate a bullet-point summary of all content on that page via the ZAK-AI REST API. The generated summary is written directly into the element's RichText field and rendered on the frontend as HTML.

Features 

  • AI-generated summaries -- sends all page content to the ZAK-AI bulletpoints endpoint and returns a structured bullet-point list.
  • CKEditor 5 integration -- the generated text is inserted directly into the bodytext RichText field, including full CKEditor 5 support.
  • Language-aware -- the language selector in the backend widget passes the current page language to the API for language-appropriate output.
  • Custom FormEngine element -- a dedicated backend widget renders the "Generate Page Summary" button inside the content element form.
  • Frontend rendering -- the stored bodytext is rendered as HTML using a Fluid template, compatible with fluid_styled_content.
  • Part of the Ai3 Suite -- integrates with wegewerk/ai3_core for API client and capability infrastructure.

How it works 

  1. An editor adds the Page Summary content element (CType: ai3_summary) to a page.
  2. The custom FormEngine widget displays a language selector and a "Generate Page Summary" button.
  3. On click, a backend AJAX request fetches all content records on the current page and sends them to the ZAK-AI bulletpoints API.
  4. The API response is written into the bodytext field of the content element.
  5. On the frontend, the element renders the stored bodytext as HTML inside a <div class="ce-bodytext rich-text"> wrapper.

Installation 

Requirements 

Installation via Composer 

Ai3 Summary is installed exclusively via Composer. Run the following command in your TYPO3 project root:

Install the extension
composer require wegewerk/ai3_summary
Copied!

Activate the extension 

After installation, activate the extension using the TYPO3 CLI:

Activate via CLI
vendor/bin/typo3 extension:activate ai3_summary
Copied!

Alternatively, activate it in the TYPO3 backend under Admin Tools > Extensions.

Configuration 

Ai3 Core 

Ai3 Summary relies on the configuration of Ai3 Core. Ensure that wegewerk/ai3_core is properly installed and configured with valid API credentials for the ZAK-AI service.

API Credentials 

The API credentials for the ZAK-AI service are provided via environment variables consumed by Wegewerk\Ai3Core\Api\ZakAiClient:

  • ZAKAI_API_KEY -- your ZAK-AI API key.
  • ZAKAI_SECRET -- your ZAK-AI secret.

TypoScript 

The extension automatically registers its TypoScript setup via ext_localconf.php. No manual TypoScript inclusion is required.

The setup adds the extension's template root path and maps the ai3_summary content element to the Ai3Summary Fluid template:

Registered TypoScript setup (ext_localconf.php)
lib.contentElement {
    templateRootPaths.1784806551592 = EXT:ai3_summary/Resources/Private/Templates/ContentElements/
}

tt_content.ai3_summary =< lib.contentElement
tt_content.ai3_summary {
    templateName = Ai3Summary
}
Copied!

Editor 

This section describes how editors can use the Page Summary content element in the TYPO3 backend.

Add the content element 

  1. Open the Page module and navigate to the page where you want to add a summary.
  2. Click + Content to open the content element wizard.
  3. Select the Page Summary element from the AI3 group.
  4. In the Summary generator field, select the desired language from the language selector (e.g. English or Deutsch).
  5. Click the Generate Page Summary button.
  6. Wait while the summary is being generated (Generating summary... is shown during processing).
  7. The generated bullet-point summary is automatically inserted into the Text (bodytext) field.
  8. Review and edit the generated text if needed, then save the content element.

Frontend output 

Once saved, the Page Summary content element renders the stored bodytext as HTML on the frontend inside a <div class="ce-bodytext rich-text"> wrapper, identical to standard RichText content elements.

Developer 

Architecture 

Ai3 Summary follows the Ai3 Suite capability pattern provided by wegewerk/ai3_core :

  • A Capability class registers the feature under a unique key.
  • An Endpoint class implements the ZAK-AI API call.
  • A FormEngine element renders the backend widget.
  • A backend AJAX controller handles the generation request.

PHP API 

ArticlesummaryCapability 

class ArticlesummaryCapability
Fully qualified name
\Wegewerk\Ai3Summary\Domain\Capabilities\ArticlesummaryCapability

Extends Wegewerk\Ai3Core\Domain\Capabilities\Capability. Registered via Configuration/Services.yaml with the following wiring:

  • $key: articlesummary
  • $title: Article Summary
  • $endpoint: ZakAiSummary
  • Tagged as ai3.capability

ZakAiSummary 

class ZakAiSummary
Fully qualified name
\Wegewerk\Ai3Summary\Api\ZakAiSummary

Implements Wegewerk\Ai3Core\Api\ZakAiEndpointInterface. Wraps ZakAiClient to call the ZAK-AI bulletpoints REST endpoint.

generate ( $imagePath, $description, $language)

Sends page content to the ZAK-AI API and returns the generated bullet-point summary string.

param string $imagePath

Unused; reserved for future use.

param string $description

The page content text to summarise.

param string $language

The target language for the summary.

returntype

string

ArticlesummaryController 

class ArticlesummaryController
Fully qualified name
\Wegewerk\Ai3Summary\Controller\Ajax\ArticlesummaryController

Backend AJAX controller (#[AsController]), extends Wegewerk\Ai3Core\Controller\Ajax\AbstractAjaxController.

getArticlesummary ( ServerRequestInterface $request)

Handles the AJAX generation request.

  1. Reads page_id and language from the POST body.
  2. Fetches all page content via PagesRepository::getPageContent().
  3. Calls ArticlesummaryCapability endpoint to generate the summary.
  4. Returns a JSON response with summary, source, and type: 'summary' on success, or an error JSON on failure.
returntype

ResponseInterface

FormEngine integration 

The custom FormEngine node ai3SummaryElement is registered in ext_localconf.php:

ext_localconf.php -- FormEngine node registration
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1759225980] = [
    'nodeName' => 'ai3SummaryElement',
    'priority' => 40,
    'class' => \Wegewerk\Ai3Summary\FormEngine\Ai3SummaryElement::class,
];
Copied!

The element is added to the tt_content TCA via Configuration/TCA/Overrides/tt_content_summary.php as a column of type user with renderType: ai3SummaryElement.

class Ai3SummaryElement
Fully qualified name
\Wegewerk\Ai3Summary\FormEngine\Ai3SummaryElement

Extends TYPO3\CMS\Backend\Form\Element\AbstractFormElement. Renders a <div data-ai3="ai3-summary-container"> with data-page-id and data-record-uid attributes. The Lit-HTML SummaryApp mounts into the inner <div data-ai3="ai3-summary-app">.

AJAX route 

The backend AJAX route is registered in Configuration/Backend/AjaxRoutes.php:

Route name Path Handler
ai3_articlesummary /ai3/articlesummary ArticlesummaryController::getArticlesummary

Request (POST, JSON body):

AJAX request body
{
    "page_id": 42,
    "language": "en"
}
Copied!

Response (success):

AJAX success response
{
    "summary": "• Point one\n• Point two",
    "source": "articlesummary",
    "type": "summary"
}
Copied!

JavaScript modules 

JavaScript modules are registered via Configuration/JavaScriptModules.php under the @wegewerk/Ai3Summary/ import map prefix.

  • ``@wegewerk/Ai3Summary/ai3api`` -- Ai3Api class with getArticlesummary(pageId, language) that POSTs to the AJAX route via TYPO3's AjaxRequest.
  • ``@wegewerk/Ai3Summary/summary`` -- Lit-HTML SummaryApp that renders the backend widget, handles the button click, calls Ai3Api, and writes the result into the bodytext field (CKEditor 5 and CKEditor 4 fallback supported).

Event listener 

class AfterFormEnginePageInitializedEventListener
Fully qualified name
\Wegewerk\Ai3Summary\EventListener\AfterFormEnginePageInitializedEventListener

Listens to AfterFormEnginePageInitializedEvent (#[AsEventListener]). Adds the extension's locallang.xlf as an inline language label file to the PageRenderer, making all translation keys available to JavaScript.