Skip to main content
Version: 2026.1

Architecture

This section explains how the bundle works internally. It is for developers who need to understand the system end-to-end - to extend it, debug it, or reason about a failure mode. For "what can the product do," see Features. For YAML/env reference, see Configuration. Terminology is defined once in Core Concepts; this section assumes you have read that page.

System diagram

system_architecture.pngsystem_architecture.pngsystem_architecture.png

Pages

PageWhat you'll learn
01 Agent FrameworkHow the Copilot SDK is wrapped, the two adapters (Copilot/Dummy), LLM auth modes, model resolution, performance instrumentation.
02 Request LifecycleEnd-to-end path of a chat request: auth → session → task → the three event sinks (Mercure / PHP / POST) → catch-up reconnect → completion callback.
03 AuthenticationUser session cookie validation, admin bearer token auth, MCP permission forwarding, rate limits, CSRF, audit log.
04 MCP IntegrationInternal vs external MCP servers, tool groups, the meta-tool wrapper, how cookies and session IDs are forwarded.
05 Session StorageWhat is persisted, the DB tables, session lifecycle hooks.
06 Tool SecurityThe pre-tool-use hook, SDK tool whitelist, path sandboxing. Mechanism only — for the tool catalog see the Configuration reference.
07 Configuration SystemHow agent and skill configuration flows from PHP to the agent-server: the three-layer merge, the export endpoint, skill materialization, reload paths, startup recovery.
08 Field Hint SystemHow the bundle teaches agents the correct JSON shape for every Pimcore field type — provider pattern, registry, covered types, recursion depth guard.
09 Document SchemaHow get_document_schema / get_area_brick work — the four signals an LLM receives, the AST analyzer, fixture loading + validation, the <index> placeholder convention, target-group personalization. For the fixture authoring workflow, see Extending → Template Examples.
10 File StagingThe generic read-only file-set primitive: developer-configured sets, how an agent stages and reads them, the roots/denylist security model.
11 Agent Template GenerationThe template write path: private root + Twig namespace, the validator and sandbox, test-render, persistence, clone-and-reassign, the drift-guard lint.
12 Real-time SyncMulti-client chat: live turn delivery to every tab/device via Studio's Mercure per-user topic + GlobalMessageBus, PHP as the record, the catch-up / reconnect-refetch reliability model, busy state.

The frontend is a Studio UI plugin delivered via Module Federation. It has no architecturally distinct surface beyond what Studio itself documents — the one extension point you'll likely touch is the widget renderer registry, covered in Extending → Custom Rich Chat Widgets.

Components at a glance

ComponentDirectoryStack
Agent-serveragent-server/Node.js 22, Fastify 5, TypeScript, @github/copilot-sdk
Frontend pluginassets/React 18, Redux Toolkit, Ant Design / @ant-design/x, RSBuild, Module Federation
PHP bundlesrc/Symfony 7, Pimcore 11, MCP tools, session storage API, installer