PHPackages                             hn/typo3-agent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hn/typo3-agent

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

hn/typo3-agent
==============

TYPO3 extension that integrates an AI agent directly into TYPO3, using the MCP ToolRegistry for native tool execution with an OpenAI-compatible LLM API

v1.0.0(today)00[1 PRs](https://github.com/hauptsacheNet/typo3-agent/pulls)GPL-2.0-or-laterPHPPHP &gt;=8.1.0

Since Feb 22Pushed todayCompare

[ Source](https://github.com/hauptsacheNet/typo3-agent)[ Packagist](https://packagist.org/packages/hn/typo3-agent)[ RSS](/packages/hn-typo3-agent/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (9)Versions (14)Used By (0)

TYPO3 AI Agent Extension
========================

[](#typo3-ai-agent-extension)

Integrates an AI agent directly into TYPO3 by calling the MCP ToolRegistry natively from PHP and communicating with an OpenAI-compatible LLM API. Editors create task records in the List module, and a CLI command processes them through an agent loop.

Installation
------------

[](#installation)

```
composer require hn/typo3-agent
```

Then activate the extension in TYPO3 backend or via CLI:

```
bin/typo3 extension:activate agent
```

Configuration
-------------

[](#configuration)

Go to **Settings &gt; Extension Configuration &gt; agent** and configure:

SettingDefaultDescription`apiUrl``https://openrouter.ai/api/v1/`OpenAI-compatible API base URL`apiKey`*(empty)*API key for authentication`model``anthropic/claude-haiku-4-5`Model identifier`systemPrompt`*(built-in)*System prompt for the agent`maxIterations``20`Safety limit for the agent loop### Provider Examples

[](#provider-examples)

**OpenRouter** (default — access to many models):

```
apiUrl: https://openrouter.ai/api/v1/
model: anthropic/claude-haiku-4-5

```

**OpenAI**:

```
apiUrl: https://api.openai.com/v1/
model: gpt-5.2

```

**Any OpenAI-compatible API**:

```
apiUrl: https://your-provider.com/v1/
model: your-model-id

```

Usage
-----

[](#usage)

### Creating Tasks

[](#creating-tasks)

1. Open the **List module** in TYPO3 backend
2. Navigate to the page you want the agent to work on
3. Create a new **Agent Task** record
4. Fill in the **Title** and **Prompt** fields
5. Save the record (status defaults to "Pending")

The task's `pid` (page ID) provides context — the agent automatically loads information about that page. The task's `cruser_id` determines which backend user's permissions the agent uses for tool execution.

**Note:** TYPO3 13.4 no longer auto-populates `cruser_id` via DataHandler. When `cruser_id` is 0 (default), the agent falls back to admin context. To run the agent as a specific user, set `cruser_id` manually on the task record.

### Agent Instructions

[](#agent-instructions)

Editors can maintain reusable **instructions** for the agent — tone of voice, wording rules, or how to handle specific content elements or records — as **Agent Instruction** records (`tx_agent_instruction`). This follows the progressive-disclosure idea of the [SKILL.md open standard](https://agentskills.io): the agent is its own harness, so the extension implements the pattern itself (provider-neutral — the OpenAI-compatible chat API has no native skills parameter).

Each instruction has a **mode**:

- **Always** — the body is appended to the agent's system prompt for every new chat (global base rules). Use sparingly for guidance that always applies.
- **On demand** — only the name and the "when to use" hint go into the prompt as a short index; the agent loads the full body via the `GetInstruction` tool when it is about to produce the relevant kind of content. This keeps the prompt small and scales to many instructions.

**Note:** Instructions are baked into the conversation at creation time, so they apply to newly started chats — chats already in progress keep the prompt they were created with.

Each record has:

FieldDescriptionNameShort label, shown in the prompt index and the read-only panelMode`Always` (in every prompt) or `On demand` (loaded via `GetInstruction`)When to useShort hint shown in the prompt index so the agent knows when an on-demand instruction appliesInstruction contentThe guidance itself — authored as rich text; converted to plain text/Markdown before it reaches the LLMHidden / Start / StopStandard visibility controls to stage or retire instructions without deleting them**Where to keep them:** create a dedicated folder (SysFolder) and store the instruction records there.

**Restricting who may edit (native TYPO3 permissions):** the extension does *not* hard-code a group. Instead, grant editing to the desired backend group via the standard access mechanism:

1. Edit the backend group in **Backend Users &gt; Groups**.
2. Under **Access Lists &gt; Tables (modify)**, enable `Agent Instruction`.
3. Give the group access to the SysFolder that holds the records (DB mounts / page permissions).

Groups without modify rights can still *read* the instructions, so they remain visible in the List module and in the chat info panel.

**Viewing:** the instructions appear in a collapsible panel at the top of the AI chat (both the chat list and individual chats), and — like any record — in the **List module**.

### Running the Agent

[](#running-the-agent)

Process all pending tasks:

```
bin/typo3 agent:run
```

Process a specific task by UID:

```
bin/typo3 agent:run --task=42
```

Limit the number of tasks processed:

```
bin/typo3 agent:run --limit=5
```

### Task Lifecycle

[](#task-lifecycle)

StatusValueDescriptionPending0Ready to be picked up by `agent:run`In Progress1Currently being processedEnded2Agent finished, result availableFailed3Error occurred, messages preserved### Resuming Failed Tasks

[](#resuming-failed-tasks)

When a task fails, its conversation state (messages) is preserved. To resume:

1. Fix the underlying issue (API key, network, etc.)
2. Set the task status back to "Pending" in the backend
3. Run `agent:run` again — it resumes from the last saved messages

Or resume directly: `bin/typo3 agent:run --task=42`

### Scheduler

[](#scheduler)

The `agent:run` command is schedulable — you can set it up as a recurring task in the TYPO3 Scheduler to automatically process pending tasks.

Architecture
------------

[](#architecture)

The extension uses the `ToolRegistry` from `hn/typo3-mcp-server` to access TYPO3 tools (GetPage, GetPageTree, Search, ReadTable, WriteTable, etc.) natively from PHP without MCP protocol overhead.

The `messages` JSON field in each task record stores the full OpenAI messages array — the complete conversation state. This enables resumability and future chat-like interfaces.

Development
-----------

[](#development)

Run the functional tests:

```
composer install
composer test
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/698567b7927930e86ff0ac150a1b445b3631f3b99431201503dc6d3fdfd7a368?d=identicon)[kaywien](/maintainers/kaywien)

---

Top Contributors

[![kaywalker](https://avatars.githubusercontent.com/u/1043613?v=4)](https://github.com/kaywalker "kaywalker (96 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (4 commits)")[![Nemo64](https://avatars.githubusercontent.com/u/1749936?v=4)](https://github.com/Nemo64 "Nemo64 (2 commits)")

### Embed Badge

![Health badge](/badges/hn-typo3-agent/health.svg)

```
[![Health](https://phpackages.com/badges/hn-typo3-agent/health.svg)](https://phpackages.com/packages/hn-typo3-agent)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k48](/packages/friendsoftypo3-content-blocks)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k39](/packages/civicrm-civicrm-core)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40529.5k](/packages/wazum-sluggi)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[typo3/cms-redirects

TYPO3 CMS Redirects - Create manual redirects, list existing redirects and automatically createredirects on slug changes.

167.4M78](/packages/typo3-cms-redirects)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

611.1M8](/packages/netresearch-rte-ckeditor-image)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
