Skip to main content
Develop Master

LLM-powered Volto block generation and rewriting, built on the agentic infrastructure of eea.genai.core.

Main features

  1. generate_blocks(user_request, context, request, properties) — produce a full blocks + blocks_layout structure from a natural-language description (blocks_generator agent).

  2. generate_block(user_request, block_type=None, ...) — produce a single block (blocks_generator_single agent).

  3. rewrite_blocks(blocks, style=None, ...) and rewrite_block(block, style=None, ...) — rewrite text content in one or more blocks (block_rewriter / block_rewriter_single agents).

  4. IBlockKnowledge named-utility registry — packages declare a block type’s description, JSON schema, example, text extractor, and sanitizer. The agent’s system prompt is built from these utilities.

  5. BlocksKnowledgeSkill enricher — injects every registered block type’s schema + example into the agent’s system prompt.

  6. BlocksContentProvider enricher — injects the current page’s block text into the user prompt (batched IBlockKnowledge lookups, no per-block ZCA queries).

  7. Ships block knowledge for slate, image, columnsBlock, tabs_block. Custom block types register their own via <genai:blockKnowledge>.

  8. @llm-generate-blocks and @llm-rewrite-blocks REST endpoints.

Install

  • Add eea.genai.blocks to your requirements.txt.

  • Install the GenericSetup profile.

  • The four default agents are registered automatically via ZCML and can be overridden by name via the core control panel agents_json.

Adding a new block type

In your addon’s configure.zcml:

<genai:blockKnowledge
    block_type="my_block"
    title="My Block"
    class=".knowledge.MyBlockKnowledge"
/>

In knowledge.py:

from eea.genai.blocks.interfaces import BlockKnowledge

class MyBlockKnowledge(BlockKnowledge):
    description = "Describe what the block is for"
    schema = '{"@type": "my_block", "value": "..."}'
    example = '{"@type": "my_block", "value": "hello"}'

    def text_extractor(self, block):
        return block.get("value", "")

    def block_sanitizer(self, block):
        return block  # post-LLM cleanup, return canonical dict

Generation/rewriting agents will pick up the new block type automatically — no change to agent config required.

Changelog

1.0 - (2026-05-21)

  • Initial release

Release files for eea.genai.blocks 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eea.genai.blocks 1.0
File Size Uploaded
eea_genai_blocks-1.0.tar.gz 25.2 kB Details

Release files / eea_genai_blocks-1.0.tar.gz

Download URL eea_genai_blocks-1.0.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a8b8646c75efce9308a7ffa3cfb9c0d37811b0540ed0ff80c3ada09719a1061f
BLAKE2b-256 checksum
How to use checksums
daf67eb98ea91cd463f032b0c5d2f7df4e5739be8952954cc49b53c09db4e8e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page