Configuration
Stores → Configuration → SEO Suite → AI Meta Generator (Claude)
All fields are per-store-overridable.
Core
| Field | Path | Notes |
|---|---|---|
| Enable AI generation | byte8_seosuite/ai/is_active | Master switch — also gates the in-context button visibility |
| Anthropic API key | byte8_seosuite/ai/api_key | Stored encrypted via Magento\Config\Model\Config\Backend\Encrypted |
| Model | byte8_seosuite/ai/model | claude-haiku-4-5 (default), claude-sonnet-4-6, claude-opus-4-7 |
| Max output tokens per request | byte8_seosuite/ai/max_output_tokens | 1024 default — fits ~600 chars of structured JSON |
Output rules
| Field | Path | Default |
|---|---|---|
| Meta title char limit | byte8_seosuite/ai/title_limit | 60 (Google truncates around here) |
| Meta description char limit | byte8_seosuite/ai/description_limit | 155 |
The parser enforces these via word-boundary truncation — Claude is also instructed to stay under them.
Voice & strategy
| Field | Path | Example |
|---|---|---|
| Brand voice / tone instructions | byte8_seosuite/ai/brand_voice | "Premium, conversational, British English. Avoid superlatives. No exclamation marks." |
| Always-include keywords / categories | byte8_seosuite/ai/global_keywords | running shoes, athletic footwear, sportswear |
These flow into the first cached system block, so changes invalidate the cache only when you save them — within a batch run, every entity sees the same brand voice.
Approval workflow
| Field | Path | Default |
|---|---|---|
| Auto-approve and apply | byte8_seosuite/ai/auto_approve | No |
When Off (recommended), suggestions queue with status=pending for human review. When On, every successful suggestion is immediately written to the entity's meta_title / meta_description (status=applied).
Use auto-approve for:
- Trusted batch runs you've sampled and approved
- Cron auto-generation (so new SKUs get meta within 30 minutes of being added)
Avoid auto-approve for:
- The first run of a new store
- Sonnet/Opus runs on hero pages (manually review high-stakes copy)
Cron auto-generator
| Field | Path | Notes |
|---|---|---|
| Auto-generate via cron | byte8_seosuite/ai/cron_enabled | Every 30 min — scans for entities with empty meta_title and no existing suggestion |
| Cron budget per run | byte8_seosuite/ai/cron_budget_per_run | 25 default — hard cap on suggestions generated per run |
| Cron entity types | byte8_seosuite/ai/cron_entities | Comma-separated. Default: product,category,cms_page |
Budget cap exists to prevent runaway API spend if you suddenly bulk-import 10000 products.
See Cron auto-generation for the full picture.
Where the API key lives
The key is encrypted with Magento's standard core_config_data encryption (Magento\Framework\Encryption\EncryptorInterface). The decryption key is your Magento crypto key in app/etc/env.php.
This is the same security model Magento uses for payment gateway credentials.
Per-store strategy
Common patterns:
- One Anthropic key for everything → set at default scope; per-store voice/keyword overrides only
- Different brand voices per store → set the API key and model at default; override
brand_voiceandglobal_keywordsper store - Different models per store → e.g. Haiku for low-margin localised stores, Opus for the flagship
Validation
Smoke-test the connection without queueing anything:
bin/magento seosuite:meta:generate -e product -i 1 --dry-run
The --dry-run flag prints the entity ID that would be processed without making the API call. To make a real one-shot call, drop --dry-run:
bin/magento seosuite:meta:generate -e product -i 1
Then check the AI Meta Suggestions grid — you should see one row with model, token usage, and the generated copy.
If you see status=failed with error="Anthropic API key is not configured" or similar, the key wasn't decrypted properly — re-save it in admin.