entity_blueprint
Entity Blueprint is a generic, standalone module — but it was built to power the AI page building features in Plus Suite. Plus Suite uses Entity Blueprint as the bridge between AI agents Entities and Layout Builder, letting AI create and edit full pages through the blueprint JSON format.
Drupal entities — especially Layout Builder pages with nested paragraphs, inline blocks, and opaque third-party settings — are too complex for AI to manipulate through Drupal's internal APIs directly.
Without this, AI agents must either:
- Navigate Drupal's deeply nested entity/field/plugin APIs, which require framework expertise an LLM does not have.
- Use REST/JSON:API, which serialize entities faithfully but do not provide a simplified, writable format or structured validation feedback suitable for AI round-trips.
- Attempt direct entity manipulation, risking silent data loss in Layout Builder's opaque settings (third_party_settings, additional, configuration) that the AI doesn't understand.
Entity Blueprint provides a clean JSON interface: serialize any fieldable entity to a format an AI (or any external system) can understand, modify the JSON, and deserialize it back into a valid Drupal entity with full validation and structured error feedback.
Features
- Full serialization — Convert any fieldable entity (nodes, blocks, paragraphs, Layout Builder pages) to JSON.
- Three serialization modes — Full (all field values), summary (tree structure only, no field values), and component (single UUID with context).
- Deserialization with validation — Two-phase validation: Phase A (structural) catches schema errors cheaply, Phase B (semantic) checks permissions, constraints, and reference resolution. Returns unsaved entities with structured errors and warnings.
- Targeted CRUD operations — Add, update, or remove individual components, update fields, restructure layouts, and reorder field values without full entity round-trips.
- Batch operations — Execute multiple operations atomically with rollback on failure.
- JSON schema generation — Generate descriptive JSON schemas for entity type and bundle combinations so AI agents can learn entity structures before acting.
- Opaque data protection — Layout Builder internals (third_party_settings, layout_settings, configuration) are preserved from the existing entity by default. Only keys explicitly declared as managed via hook are exposed.
- Multilingual support — Serialize and deserialize with langcode for translation workflows.
- Extensible field handlers — Register handlers for custom field types via tagged services.
Submodules
Entity Blueprint AI (entity_blueprint_ai) exposes all entity_blueprint operations as AI agent function-call tools for the Drupal AI module.