5-Minute Quickstart
This quickstart walks through the Aegean Voyages (aegeanvoyages.example) workflow from site/modules/Ai/examples/real-world/.
End-to-End Setup
Section titled “End-to-End Setup”-
Add a Provider & Enable Models in Setup -> AI:
- Open Setup -> AI -> Providers and click + New Provider.
- Choose a driver (for example
openrouter,gemini,anthropic,openai, or localollama) and add an encrypted key or$env:OPENROUTER_API_KEY. - Open Models, click Fetch Live Models (/models), enable at least one model, and assign default routes in Routing & Governance.
-
Generate Grounded Editorial Copy in PHP:
<?php declare(strict_types=1);namespace ProcessWire;$ai = Ai::requireInstance($wire);$result = $ai->generate('Write a 3-sentence charter overview for M/Y Aegean Horizon departing Gocek Marina.',['tier' => 'balanced','voice' => 'aegean-editorial','rules' => ['aegean-yacht-rule'],]);echo $result->text(); -
Localize a Multi-Language Page With a Protected Glossary:
Terminal window php vendor/bin/wire ai:translate 1042 --to=tr --glossary=maritime-terms --dry-run --jsonRemove
--dry-run(or add--queuefor background execution viaBulkTranslateQueue) to apply the localized fields while keeping terms likeAPA,Gulet, andGocekconsistent. -
Index Content for Semantic Search & Visitor Chat:
Terminal window php vendor/bin/wire ai:index --type=pages --template=yacht --limit=100 --json -
Run a Pre-Publish Editorial Audit:
Terminal window php vendor/bin/wire ai:audit --template=yacht --limit=20 --format=table --json