Drupal is a registered trademark of Dries Buytaert

govai

No security coverage
View on drupal.org

This module provides a plugin for the AI core module in Drupal, enabling integration with the GovAI backend.

Features

  • Seamless integration with the GovAI backend — Provides a plugin under the AI module ecosystem to connect your Drupal site to the Australian Government’s GovAI environment, enabling LLM services directly from Drupal.
  • Flexible API configuration — Configure the API endpoint, API key and default model via UI, making it easy to switch between sandbox, pilot and production environments.
  • Unified provider plugin architecture — Built on the AI module’s provider framework, so you can select “GovAI” alongside other providers and swap back-ends with minimal changes.
  • Editor integration support — Leverage existing AI module editor/toolbar integrations (e.g., CKEditor) to call the GovAI backend for content suggestions, rewriting, summarisation or prompt-based workflows.
  • Structured service layer — The `GovAiClient` service encapsulates HTTP calls and authentication logic, making it easier to extend, override or instrument for logging and audit.
  • Governance & compliance ready — Designed for government-use scenarios: you can build in logging, auditing, input sanitisation (via the service layer) and align with regulatory frameworks.
  • Drupal standards-compliant — Uses dependency injection, configuration management (`govai.settings`), plugin definitions (`@AiProvider`), and is contribution-ready and version-control friendly.

Post-Installation

  1. Navigate to Manage → Extend (or via Drush: drush en govai) and enable the GovAI module.
  2. Go to the configuration page at /admin/config/ai/providers/govai and enter your API endpoint, API key, and default model. Save the settings.
  3. Under Manage → Configuration → AI, choose “GovAI” as the provider for operations such as content generation, chat, summarisation or editor integration.
  4. Assign permissions (via Manage → People → Permissions) so that appropriate roles (e.g., content authors or editors) have access to use the AI features (for example: “Use GovAI”).
  5. Clear caches (via UI: Manage → Configuration → Performance → Clear all caches or via Drush: drush cr) to ensure that the new provider and configuration take effect.
  6. Test the integration:
    • Create or edit a content piece and use the AI provider button (in the editor toolbar) or use the configured chat block/helper to send a prompt to the backend.
    • Verify the returned result is appropriate and displays correctly.
  7. Monitor logs (via Reports → Recent log messages) to ensure there are no errors from the API requests or permission issues.
  8. Optionally, inform your team and update any editorial workflows to include the AI features (e.g., “Use AI to draft content, then human review and approve”).
  9. Document the process and update any internal governance or training materials so users understand how to use the new “GovAI” features safely and appropriately.

Additional Requirements

  • A valid API endpoint URL, API key (or equivalent credential) and default model identifier issued by the GovAI hosting environment and configured in the module’s settings.
  • Your agency or organisation must have access to GovAI services (e.g., via an approved sandbox, pilot or production hosting environment) and meet any onboarding, registration or credentialing requirements.
  • Network connectivity from your Drupal server to the GovAI API endpoint (outbound HTTP/HTTPS traffic permitted; any proxy or firewall considerations handled).
  • Secure storage of secrets: The API key (or equivalent credential) must be stored securely (e.g., via the Key module or environment config) and not exposed in public configuration.
  • Data classification alignment: Ensure that the content/data you send to the GovAI backend is appropriate for the hosting environment.
  • Access controls & permissions: Ensure user roles in Drupal are appropriately configured so that only authorised users can invoke the GovAI, prompt the model, or view AI-generated content.
  • Logging, auditing & compliance readiness: Because the module will connect to an external AI backend, you should ensure that prompts, responses, errors and usage are logged or auditable, in line with your organisation’s governance framework.
  • Error handling, fallback and performance considerations: You should consider how your website will behave when the GovAI service is unavailable or slow, and optionally implement caching or queueing if needed.
  • Governance alignment: Your use of AI via GovAI must align with relevant Australian Government policies and frameworks.

Activity

Total releases
1
First release
Nov 2025
Latest release
3 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev Nov 13, 2025