Skip to main content
Version: 2026.1

Agent Templates

Configuration for agent template generation. All keys live under pimcore_agent.agent_templates; this is a developer/devops concern.

KeyDescription
private_rootWhere approved templates are written. Defaults to %kernel.project_dir%/var/agent-templates.
sample_documents.folder_pathFolder under which sample documents are detected and created. Default /_agent-samples; auto-created on first sample.
test_render.controllerController whose context-population logic the test-renderer runs before rendering. Defaults to the bundle's TestRenderController; override when templates depend on controller-injected variables (navigation, breadcrumbs, site config, …).
test_render.max_output_bytesByte cap on test-render output. Default 1048576 (1 MiB).
test_render.timeout_msWall-clock cap on a test-render. Default 2000.
test_render.sandbox.allowed_tagsTwig tags permitted in generated templates and at test-render.
test_render.sandbox.allowed_filtersPermitted Twig filters.
test_render.sandbox.allowed_functionsPermitted non-pimcore_ functions. All pimcore_* editable helpers are allowed implicitly by prefix and need not be listed.
test_render.sandbox.extra_allowed_tags / extra_allowed_filters / extra_allowed_functionsProject extension points, merged onto the defaults. Register a project's own side-effect-free Twig helpers here.

The sandbox defaults already cover the common tags/filters/functions and every pimcore_* editable. A project usually only needs the extra_* merge points to register its own helpers.

pimcore_agent:
agent_templates:
private_root: '%kernel.project_dir%/var/agent-templates'
sample_documents:
folder_path: '/_agent-samples'
test_render:
controller: 'Pimcore\Bundle\PimcoreAgentBundle\Controller\TestRenderController'
max_output_bytes: 1048576
timeout_ms: 2000
sandbox:
# Defaults already cover the common helpers and every pimcore_* editable;
# use the extra_* merge points to register the project's OWN Twig helpers.
extra_allowed_filters:
- 'currency'
- 'country'
extra_allowed_functions:
- 'app_product_detaillink'
- 'get_localized_links'

Enable the feature on an agent with pimcoreMcpServers: ['pimcore-agent-templates'] and the document-template-generation skill - see Features → Agent Templates.

Further reading