Agent Templates
Configuration for agent template generation. All keys live under
pimcore_agent.agent_templates; this is a developer/devops concern.
| Key | Description |
|---|---|
private_root | Where approved templates are written. Defaults to %kernel.project_dir%/var/agent-templates. |
sample_documents.folder_path | Folder under which sample documents are detected and created. Default /_agent-samples; auto-created on first sample. |
test_render.controller | Controller 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_bytes | Byte cap on test-render output. Default 1048576 (1 MiB). |
test_render.timeout_ms | Wall-clock cap on a test-render. Default 2000. |
test_render.sandbox.allowed_tags | Twig tags permitted in generated templates and at test-render. |
test_render.sandbox.allowed_filters | Permitted Twig filters. |
test_render.sandbox.allowed_functions | Permitted 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_functions | Project 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
- Architecture → Agent Template Generation - what these settings drive.
- Configuration → File Staging - the file sets the agent reads before drafting.