Download the PHP package hn/typo3-agent without Composer

On this page you can find all versions of the php package hn/typo3-agent. 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 typo3-agent

TYPO3 AI Agent Extension

Integrates an AI agent directly into TYPO3 by calling the MCP ToolRegistry natively from PHP and talking to an OpenAI-compatible LLM API. Editors work with the agent through a dedicated backend chat module; a CLI command additionally processes pending task records for scheduled/batch runs.

Installation

Then activate the extension in TYPO3 backend or via CLI:

For non-composer TYPO3 installations the TER package bundles the required PHP libraries (PhpOffice, smalot/pdfparser); a fallback autoloader in ext_localconf.php loads them when no composer autoloader has already provided them.

Configuration

Go to Settings > Extension Configuration > agent and configure:

Setting Default Description
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 (dropdown: Claude Opus 4.8 / Claude Haiku 4.5)
systemPrompt (built-in) System prompt for the agent
maxIterations 20 Safety limit for the agent loop
reasoningEffort medium Extended-reasoning strength (off, low, medium, high)
webFetch 1 Enable OpenRouter's server-side web_fetch tool so the agent can retrieve and read URLs (executed by OpenRouter, no local handler needed)

Provider Examples

The model field ships as a curated dropdown. To use another provider or model ID, adjust ext_conf_template.txt (or ship a site-specific override).

OpenRouter (default — access to many models):

OpenAI:

Any OpenAI-compatible API:

Usage

Backend Chat Module

The primary UX is the Web > TYPO3 Agent Tasks backend module. It offers:

Attachments & Multimodal

Files can be dragged onto the composer or picked via the file browser. The chat UI pre-flights each attachment against an allowlist and size cap so users see up-front whether a file will be embedded as content for the LLM or only referenced by metadata.

Prerequisite for uploads: the composer uses TYPO3 Core's file-upload AJAX endpoints (/typo3/ajax/file/exists and /typo3/ajax/file/process), whose access is inherited from the file module (media_management). BE groups whose members should be able to upload attachments must therefore include this module in their allowed modules. Existing attachments already stored in FAL can still be referenced without this — only the drag-drop/upload path is affected.

Composer uploads are written into a non-public agent scratch storage (var/agent-scratch/user_{beUserUid}/, is_public=0); they are not web-reachable until the agent promotes them into a regular FAL folder via the PromoteScratchFile tool (which happens automatically when the agent references the file in a record).

Kind Formats Size cap
Image PNG, JPEG, WebP, GIF 5 MB
PDF PDF 50 MB
Spreadsheet XLSX, ODS, XLS, CSV 25 MB
Document DOCX, ODT, RTF, TXT, Markdown, HTML 25 MB
Presentation PPTX, ODP 25 MB

Attachments enter the conversation as multimodal tool messages via the ReadFile tool listed under Architecture below (image bytes inline, extracted text/pages for PDF and Office files).

Creating Tasks Directly (List Module / CLI)

For scheduled or automated runs — batch seeding, cron-driven workflows, external triggers — you can also create task records directly:

  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

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: 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:

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:

Field Description
Name Short label, shown in the prompt index and the read-only panel
Mode Always (in every prompt) or On demand (loaded via GetInstruction)
When to use Short hint shown in the prompt index so the agent knows when an on-demand instruction applies
Instruction content The guidance itself — authored as rich text; converted to plain text/Markdown before it reaches the LLM
Hidden / Start / Stop Standard 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 > Groups.
  2. Under Access Lists > 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 from the CLI

Process all pending tasks:

Process a specific task by UID:

Limit the number of tasks processed:

Task Lifecycle

State transitions run through Classes/Domain/TaskStateMachine.php.

Status Value Description
Pending 0 Ready to be picked up by agent:run
In Progress 1 Currently being processed
Ended 2 Agent finished, result available
Failed 3 Error occurred, messages preserved
Cancelled 4 Run was canceled before completion

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

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

Workspaces

Agent tasks are workspace-aware: each task record stores a workspace_id (set automatically) and the agent runs against that workspace's data. Two event listeners hook into the workspace lifecycle: one clears change tracking on publish, the other filters the workspace diff view to the records the task actually touched. In the chat UI, the workspace-changes drawer surfaces those tracked records inline.

Architecture

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

On top of that it ships its own agent tools under Classes/MCP/Tool/:

These agent tools are registered with a dedicated agent.tool DI tag and merged with the MCP core tools in Hn\Agent\MCP\AgentToolRegistry, which only the agent loop consumes. They are deliberately not tagged mcp.tool, so they do not appear in the ToolRegistry that the mcp_server extension exposes to external MCP clients — they are designed around this extension's chat internals (scratch storage, multimodal tool messages, instruction records) and external agents bring their own file handling. To expose an individual tool over MCP anyway, tag its service with mcp.tool in Configuration/Services.yaml.

Each conversation turn is persisted as a tx_agent_message record (role, content, tool calls, attachments as sys_file_reference rows), linked to its task via the inline chat_messages relation. This enables resumability, the SSE streaming loop, and the chat UI's message history.

Upgrading from the JSON-column era

Versions that stored the whole conversation in a tx_agent_task.messages JSON column are migrated by the "Migrate agent task chat histories to tx_agent_message records" upgrade wizard (agent_migrateTaskMessages). Run the database schema update first (it leaves the legacy messages column untouched — the new counter is deliberately named chat_messages), then execute the wizard in the Install Tool or via bin/typo3 upgrade:run agent_migrateTaskMessages. Afterwards the emptied messages column can be removed via the database analyzer.

Development

Run the functional tests (SQLite via typo3/testing-framework):

The bin/typo3 agent:repro-multimodal command (see Classes/Command/ReproMultimodalCommand.php) probes which LLM providers accept multimodal tool results — useful when adding or debugging providers.

TER release builds run through composer build:ter (see Build/build-ter.sh) and a matching GitHub Actions workflow. Functional tests also run in CI across the supported PHP and TYPO3 matrix.


All versions of typo3-agent with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
hn/typo3-mcp-server Version *
phpoffice/phppresentation Version ^1.1
phpoffice/phpspreadsheet Version ^3.10
phpoffice/phpword Version ^1.4
smalot/pdfparser Version ^2.12
typo3/cms-backend Version ^13.4|^14.3
typo3/cms-core Version ^13.4|^14.3
typo3/cms-workspaces Version ^13.4 || ^14.3
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 hn/typo3-agent contains the following files

Loading the files please wait ...