"Joomla is ideal for AI" is marketing. What's true, and useful, is that Joomla has clearly separated places where an AI integration can live, and a permission system strong enough to keep it contained. This post maps those places: which kind of AI feature belongs where in Joomla's architecture, with the code entry point for each.
The map
| Integration point | Runs when | Good for |
|---|---|---|
Web Services API (/api) | an outside client calls | assistants via MCP, external pipelines, imports |
| Scheduler task plugin | on a schedule, logged | batch generation: summaries, tags, alt texts, translations |
| Console command | a person or deploy script runs it | one-off bulk jobs with review (CSV in, CSV out) |
Content events (onContentBeforeSave …) | an editor saves | cheap checks and flags, not slow API calls |
com_ajax plugin | an editor clicks a button | "suggest a description" in the edit form |
| Custom fields | always | storing structured AI output where templates can use it |
| ACL, Workflows, User Actions Log | always | keeping the AI's account inside its lane, and auditable |
1. The API: the outside door
Since Joomla 4, every core resource is available through /api/index.php/v1/…, with per-user tokens and Joomla's normal permissions. An assistant connected through MCP works through this door and nothing else, which means the AI's reach is exactly the token user's ACL. Custom components join with a webservices plugin and JSON:API views. Details in the REST API guide.
2. Events: for checks, not for calls
Content events fire inside the editor's save request. They're the right place for quick rules about AI content, and the wrong place for slow API calls. An example we use: a plugin that keeps AI drafts from being published without a human edit.
// plugins/content/aiguard/src/Extension/AiGuard.php
final class AiGuard extends CMSPlugin implements SubscriberInterface
{
public static function getSubscribedEvents(): array
{
return ['onContentBeforeSave' => 'onContentBeforeSave'];
}
public function onContentBeforeSave(BeforeSaveEvent $event): void
{
$article = $event->getItem();
if ($event->getContext() !== 'com_content.article' || (int) $article->state !== 1) {
return;
}
// AI drafts carry a note; publishing one needs an editor's edit first
$aiDraft = str_starts_with((string) $article->note, 'AI draft');
$aiUserId = (int) $this->params->get('ai_user');
$lastByAi = (int) $article->modified_by === $aiUserId;
if ($aiDraft && $lastByAi) {
throw new \RuntimeException('This AI draft must be edited by an editor before it is published.');
}
}
}
A RuntimeException in onContentBeforeSave stops the save, and Joomla shows the message to the editor. Cheap, synchronous, no external call. That's the profile of a good event listener.
3. Scheduler and console: where the model calls go
Anything that calls an LLM belongs outside the visitor's and the editor's request. The Scheduler runs task plugins with logging, locking and a status per run. Console commands handle the bulk jobs a person starts and reviews. Both get the database injected, both can run for minutes without anyone waiting. The patterns are in calling LLM APIs from Joomla and the meta description command.
4. Custom fields: structured output
When a model produces structured data (a reading level, key takeaways, a product's specs extracted from a PDF), don't paste it into the article HTML. Store it in custom fields. Templates can then render it consistently, filter on it, and replace it without touching the text. The API accepts fields by name, so a pipeline can write "key_takeaways": "…" directly:
// in a layout override – templates/yourtemplate/html/com_content/article/default.php
$fields = FieldsHelper::getFields('com_content.article', $this->item, true);
$take = array_values(array_filter($fields, fn ($f) => $f->name === 'key_takeaways'))[0] ?? null;
if ($take && $take->rawvalue !== '') : ?>
<aside class="takeaways"><?php echo $take->value; ?></aside>
<?php endif; ?>
5. ACL, Workflows and the action log: containment
This is where Joomla is genuinely strong compared with simpler CMSs. An AI integration gets its own user, in its own group:
- ACL per category and per action: may create in "Blog", may not edit state, may not delete. Enforced on every API request.
- Workflows (core since Joomla 4): the AI's group can execute exactly one transition, "Submit for review".
- User Actions Log: every change by that user is recorded with time and item, which gives you an audit trail of what the AI did, for free.
None of this needs AI-specific code. It's the same machinery that keeps a junior editor from publishing on the home page.
What to avoid
- LLM calls in system plugins (
onAfterRoute,onAfterRender): every page waits, every outage is yours. - A Super User token for any automation.
- Writing AI output directly into published content without a review state.
- Keys in plugin parameters, which end up in every database dump.
